mirror of
https://github.com/bearstonem/openmohaa-vr.git
synced 2026-10-18 21:00:22 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2f3401959 | ||
|
|
667c50f9b2 | ||
|
|
bcf1c4a4ea | ||
|
|
7831195b98 | ||
|
|
44ce0595c2 | ||
|
|
2a105f52a3 | ||
|
|
067302c108 | ||
|
|
614f424105 | ||
|
|
b1a45c0546 | ||
|
|
8b9881736c | ||
|
|
21a6e07180 | ||
|
|
a21732ce3e | ||
|
|
46aa4ebed1 | ||
|
|
5ebf885a19 | ||
|
|
8c31216b59 | ||
|
|
d50de3f00a | ||
|
|
969311274f | ||
|
|
919206af63 | ||
|
|
dd1e7469ab | ||
|
|
42a9d00bbf | ||
|
|
b1d81e4e92 | ||
|
|
94d10d08d5 | ||
|
|
842f120b43 | ||
|
|
f812e784e0 | ||
|
|
25b336eb58 | ||
|
|
ab43a0def6 | ||
|
|
87dd1f650e | ||
|
|
68cca1c58b | ||
|
|
7edc1028bd | ||
|
|
903c4a290e | ||
|
|
e7c192fbf2 | ||
|
|
8cbaff38b5 | ||
|
|
e7bd3c22c4 | ||
|
|
3f83b4b36a | ||
|
|
97da1c58d1 | ||
|
|
cbbf307fd0 | ||
|
|
c98165ea5f | ||
|
|
0c5f7db70d | ||
|
|
dfd9bd230c | ||
|
|
41a4ba9036 | ||
|
|
230fcb7ff6 | ||
|
|
bd8a07cd4e | ||
|
|
69d2236d8b | ||
|
|
729e72ae40 | ||
|
|
b5c25001e9 | ||
|
|
8779f00195 | ||
|
|
7b357cdfa9 | ||
|
|
3e4b989a13 | ||
|
|
b64ba58654 | ||
|
|
5b663c9699 | ||
|
|
5e3944d530 | ||
|
|
8a8d0d3a63 | ||
|
|
b8a20d9ab9 | ||
|
|
489bd9385c | ||
|
|
02de33a5c8 | ||
|
|
f53dc80d7c | ||
|
|
6e6ccd8f05 | ||
|
|
d77873ccf7 | ||
|
|
1b33f499e7 | ||
|
|
887b649bb5 | ||
|
|
dda5b11cbc | ||
|
|
9ec545aae6 | ||
|
|
497b0df699 | ||
|
|
0d271fe180 | ||
|
|
879e2397ce | ||
|
|
b19a3406fb | ||
|
|
a09132b9fd | ||
|
|
2970ab1d02 | ||
|
|
e1f49207d2 | ||
|
|
cb39fe5709 | ||
|
|
55443336d8 | ||
|
|
951b4b33b9 | ||
|
|
2681659329 | ||
|
|
3cda08bec4 | ||
|
|
098843cd0a | ||
|
|
3af8c64bfc | ||
|
|
a4c70670df | ||
|
|
f74343b183 | ||
|
|
12202e2d98 | ||
|
|
54c98c5e38 | ||
|
|
be4e3fd7ac | ||
|
|
46798d46dc | ||
|
|
b019c1811c | ||
|
|
55a990efa6 | ||
|
|
97ae04eff3 | ||
|
|
9fd2fb13f1 | ||
|
|
e3a873b4aa | ||
|
|
f8876404c2 | ||
|
|
3e16d8a2ff | ||
|
|
82be5b03bd | ||
|
|
f648db6b52 | ||
|
|
277717120d | ||
|
|
9db02300dc | ||
|
|
c46b6cddfe | ||
|
|
942ae5c038 | ||
|
|
42fa1fb87d | ||
|
|
5604a1f7f8 | ||
|
|
ac993b45b9 | ||
|
|
701964b8c2 | ||
|
|
9168f32cdb | ||
|
|
042108d12c | ||
|
|
634a2371e6 | ||
|
|
f4a21b73a4 | ||
|
|
3c3683536b | ||
|
|
2fececd62f | ||
|
|
68383565f2 | ||
|
|
51f2ed1cba | ||
|
|
f723cbf01d | ||
|
|
9a22cc94b2 | ||
|
|
7ee122f0b2 | ||
|
|
8169bd01a8 | ||
|
|
351a5fa644 | ||
|
|
e48baf19a9 | ||
|
|
9077a8c0ee | ||
|
|
52146bee45 | ||
|
|
63a1679bf6 | ||
|
|
b1a18b66a8 | ||
|
|
e39f9dc6e5 | ||
|
|
a767599893 | ||
|
|
777a9f2405 | ||
|
|
3b1d1699c7 | ||
|
|
59f2aea41d | ||
|
|
26508d26f0 | ||
|
|
8df4c82855 | ||
|
|
80732c6256 | ||
|
|
f666681035 | ||
|
|
c2d5f203b8 | ||
|
|
ec1ab7f327 | ||
|
|
7584af9774 | ||
|
|
8af5d9179d | ||
|
|
af660acc40 | ||
|
|
561ee6648a | ||
|
|
e7c66cfb77 | ||
|
|
2e58621210 | ||
|
|
4a839f5b41 | ||
|
|
a43ed409cf | ||
|
|
d82f0258a0 | ||
|
|
a16db487e8 | ||
|
|
1fd5c7319d | ||
|
|
b44252b989 | ||
|
|
35f74db1d3 | ||
|
|
b839d55a07 | ||
|
|
5df5735965 | ||
|
|
4373b3d976 | ||
|
|
7e1de3e0cc | ||
|
|
61cf668c68 | ||
|
|
cca1f28ce6 | ||
|
|
f5861f5329 | ||
|
|
fbe9cfb445 | ||
|
|
3f090ff1ec | ||
|
|
06b1c0e879 | ||
|
|
94328af9b1 | ||
|
|
21d6401da7 | ||
|
|
f2c31e956e | ||
|
|
c1c230f04c | ||
|
|
8eb3f66b45 | ||
|
|
548f07cc5a | ||
|
|
cf523bd4cd | ||
|
|
6737aaf017 | ||
|
|
800e82327b | ||
|
|
b06857d077 | ||
|
|
0487696dc3 | ||
|
|
c7e2431e15 | ||
|
|
6eae2c9841 | ||
|
|
e75b535c82 | ||
|
|
ba4cf34530 | ||
|
|
2c9e500570 | ||
|
|
941f2de533 | ||
|
|
b64a3765e5 | ||
|
|
b5a0006724 | ||
|
|
105202e0b1 | ||
|
|
cbb43b702e | ||
|
|
53bd800669 | ||
|
|
e4ec343a80 | ||
|
|
353ae6a12f | ||
|
|
28274e9422 | ||
|
|
bc5217915c | ||
|
|
dc50137f66 | ||
|
|
bba5213d38 | ||
|
|
69864db4e7 | ||
|
|
a40b9104b6 | ||
|
|
457c2f0a43 | ||
|
|
fb741a9a0b | ||
|
|
3886afec57 | ||
|
|
fcc84bae6e | ||
|
|
edb2419c98 | ||
|
|
b89bd34b4c | ||
|
|
10e6221e35 | ||
|
|
feaf3fe8d0 | ||
|
|
3039da305a | ||
|
|
69a63629e4 | ||
|
|
a64007cb23 | ||
|
|
8041939976 | ||
|
|
d757609842 | ||
|
|
acd3757f7e | ||
|
|
4429d22f11 | ||
|
|
f84e881b9a | ||
|
|
1e68f67743 | ||
|
|
a07e642820 | ||
|
|
1c27f3edd1 | ||
|
|
6bff3a0731 | ||
|
|
5c9eb7c858 | ||
|
|
46f668ee12 | ||
|
|
e115d142b4 | ||
|
|
309f21e172 | ||
|
|
25705763e5 | ||
|
|
48febb1247 | ||
|
|
28e6ea159c | ||
|
|
05e086e015 | ||
|
|
ddfada66c4 | ||
|
|
c9e145a4ff | ||
|
|
c84b93fb77 | ||
|
|
cf0970069b | ||
|
|
5a6ff0443a | ||
|
|
c0a6788f3e | ||
|
|
87bbb3e1d4 | ||
|
|
5a430cfd4f | ||
|
|
f974c36c6d | ||
|
|
e6eb3aa0a1 | ||
|
|
c8c9ae2468 | ||
|
|
cca7f9d20f | ||
|
|
f992185398 | ||
|
|
ce9cbdc19c | ||
|
|
9808cf8d01 | ||
|
|
f8a9a66247 | ||
|
|
bef56ad16d | ||
|
|
b495ac8324 | ||
|
|
031eb7ac2a | ||
|
|
aabb2c7d03 | ||
|
|
ce9199ea1e | ||
|
|
d610d6f45f | ||
|
|
ed6f279785 | ||
|
|
9f1749ef65 | ||
|
|
fbedcd1928 | ||
|
|
258c5f53f9 | ||
|
|
6e57eb7d00 | ||
|
|
cd4d396d30 | ||
|
|
b5dc39e953 | ||
|
|
749ff62cac | ||
|
|
c2519c86e6 | ||
|
|
6e04025971 | ||
|
|
ab70d70357 | ||
|
|
45e1daf65a | ||
|
|
c93d0f6975 | ||
|
|
e299031470 | ||
|
|
eb6b6173ee | ||
|
|
01562e5d83 | ||
|
|
d7a2e5bc65 | ||
|
|
ac67939b76 | ||
|
|
378938ae39 | ||
|
|
93d487a0d6 | ||
|
|
4b61caf47a | ||
|
|
4268269eaa | ||
|
|
1582325a72 | ||
|
|
aee897f52a | ||
|
|
6bcfe1788d | ||
|
|
b038d5ca03 | ||
|
|
4ef547cd86 | ||
|
|
0fdf19a3d4 | ||
|
|
bb9189f219 | ||
|
|
f72cc9da77 | ||
|
|
f75892cd26 | ||
|
|
8dbae6247c | ||
|
|
f72e10a297 | ||
|
|
3c92f1e13a | ||
|
|
ced7e21fd3 | ||
|
|
e68101abaa | ||
|
|
ecf70528a7 | ||
|
|
e0a748a2e7 | ||
|
|
5136eb3856 | ||
|
|
fabc7c7c74 | ||
|
|
f885408059 | ||
|
|
a2b891acd9 | ||
|
|
f529358357 | ||
|
|
270a7663c2 | ||
|
|
2adabc7468 | ||
|
|
80b2e89dcc | ||
|
|
654ab91efb | ||
|
|
555caa10f3 | ||
|
|
0c5cfb7a37 | ||
|
|
31e6830aee | ||
|
|
3a7105246d | ||
|
|
740c47fa6d | ||
|
|
a824d9e912 | ||
|
|
be3d9892e4 | ||
|
|
95474c92b3 | ||
|
|
480a377292 | ||
|
|
8ce3866e70 | ||
|
|
f5b01e7137 | ||
|
|
425885bf61 | ||
|
|
2eb190fe97 | ||
|
|
282110239e | ||
|
|
4170feddca | ||
|
|
833b660c68 | ||
|
|
edd58f2042 | ||
|
|
f7c77ce804 | ||
|
|
5da907484a | ||
|
|
f502f6a3c6 | ||
|
|
0da5496d28 | ||
|
|
e9bc305a26 | ||
|
|
4cd6a51869 | ||
|
|
3cd01b77d1 | ||
|
|
f3b66de7e3 | ||
|
|
d3ca24d27a | ||
|
|
70c12a1639 | ||
|
|
b68c2920ab | ||
|
|
59329b4fb3 | ||
|
|
4083d1123f | ||
|
|
fa047b7bf9 | ||
|
|
659939352a | ||
|
|
e556f58cc4 | ||
|
|
a72bc153db | ||
|
|
e47790cd54 | ||
|
|
8708953e96 | ||
|
|
b0ca50c4c5 | ||
|
|
1be22e9343 | ||
|
|
fabd2fd848 | ||
|
|
6d2d6e1429 | ||
|
|
df165d162d | ||
|
|
88e41fd6e5 | ||
|
|
790e4286db | ||
|
|
e6e260933a | ||
|
|
a3c10c4fae | ||
|
|
076099d0ed | ||
|
|
4d168a2e20 | ||
|
|
c0ac03afde | ||
|
|
6adeca6196 | ||
|
|
84b1d3e8d1 | ||
|
|
de65af5a43 | ||
|
|
a9b8c44206 | ||
|
|
c9f13f182c | ||
|
|
d1bfeeadbf | ||
|
|
95a7169d21 | ||
|
|
5b57949bc9 | ||
|
|
7e6ea644ba | ||
|
|
8e905c8617 | ||
|
|
0bd1159607 | ||
|
|
838f84b9f3 | ||
|
|
ee5a6b5a47 | ||
|
|
a3f520de8c | ||
|
|
57abfa297b | ||
|
|
11ba758ca3 | ||
|
|
a35008dfca | ||
|
|
83a32c2635 | ||
|
|
8336e48566 | ||
|
|
3e842ffe40 | ||
|
|
c9fcd723db | ||
|
|
175beea77e | ||
|
|
fda7cc0c6e | ||
|
|
7fc2e36bcb | ||
|
|
d00ccb5d5b | ||
|
|
0966021099 | ||
|
|
ed3af6dbf5 | ||
|
|
edb1950a76 | ||
|
|
b5821e9bbd | ||
|
|
3f44dcf301 | ||
|
|
77ed007086 | ||
|
|
ba3ebed1c9 | ||
|
|
4e8ddf3c35 | ||
|
|
850b6de927 | ||
|
|
e45ab50367 | ||
|
|
567ec755b1 | ||
|
|
beec594ea4 | ||
|
|
f59f1df9b6 | ||
|
|
0dabcc776f | ||
|
|
17ab3d1114 | ||
|
|
ba42479dbc | ||
|
|
4e9640c433 | ||
|
|
4b95809397 | ||
|
|
bd93897286 | ||
|
|
68ddfb69fc | ||
|
|
ae28b03e02 | ||
|
|
e0e1f42acc | ||
|
|
46fbb6e8b3 | ||
|
|
65601eeb48 | ||
|
|
8b75c6639b | ||
|
|
8d431681bd | ||
|
|
a9f0fe7800 | ||
|
|
34a812d462 | ||
|
|
e098f52b84 | ||
|
|
8c03001cbb | ||
|
|
e243d24839 | ||
|
|
5108c800b6 | ||
|
|
4b4644547a | ||
|
|
be43b164b8 | ||
|
|
bf95447483 | ||
|
|
854d24138e | ||
|
|
9c81b4d475 | ||
|
|
f7a5f85a75 | ||
|
|
92fafe195c | ||
|
|
a1bd17d360 | ||
|
|
cd984ccce1 | ||
|
|
d180f36370 | ||
|
|
40fb8de556 | ||
|
|
d567ef9793 | ||
|
|
f6cc732886 | ||
|
|
01f08958f0 | ||
|
|
1c5a33f82a | ||
|
|
71d8685fe3 | ||
|
|
45488c2362 | ||
|
|
73e1b47c77 | ||
|
|
7a3920bfb9 | ||
|
|
301625d3cd | ||
|
|
45c112a463 | ||
|
|
89a748673c | ||
|
|
6220ecb80c | ||
|
|
5de6180106 | ||
|
|
807359c662 | ||
|
|
0cba64ea7e | ||
|
|
a459ad27d9 | ||
|
|
5ed828e49b | ||
|
|
c59be4be1e | ||
|
|
7e2f4e0023 | ||
|
|
37af1bbe7b | ||
|
|
dc85a1e13a | ||
|
|
c23b116f11 | ||
|
|
76c9e3a30a | ||
|
|
116b84312a | ||
|
|
8c2f5184c1 | ||
|
|
e74651f548 | ||
|
|
377dfb618b | ||
|
|
e5f645ec0c | ||
|
|
7fe8a90e8a | ||
|
|
70a9a61f93 | ||
|
|
d87b97256b | ||
|
|
6e64526167 | ||
|
|
9b563eef75 | ||
|
|
b98dcd8a53 | ||
|
|
ccb4b801bf | ||
|
|
a5f7d9596a | ||
|
|
4ea06f6eb2 | ||
|
|
e1923b58f6 | ||
|
|
df294ff155 | ||
|
|
e43ade976b | ||
|
|
774c9d1853 | ||
|
|
be6d2a05d2 | ||
|
|
78565fbd3c | ||
|
|
a3662d01ba | ||
|
|
970dfcf1d8 | ||
|
|
5a563b3cf0 | ||
|
|
ca9455bea1 | ||
|
|
77bcd6d258 | ||
|
|
8c7cbfaa48 | ||
|
|
7fdc863175 | ||
|
|
ba3e68adc5 | ||
|
|
c350b7e9c4 | ||
|
|
dad49e46ed | ||
|
|
a0481b86f1 | ||
|
|
1dc0dcc3cd | ||
|
|
9ec3c68d64 | ||
|
|
50fdc70025 | ||
|
|
5ab30b97d7 | ||
|
|
099a67f1fd | ||
|
|
56db5a1845 | ||
|
|
e152eba8fc | ||
|
|
9663b38c62 | ||
|
|
3d1741ec20 | ||
|
|
64cbcd023e | ||
|
|
33cfc2cbf8 | ||
|
|
4b486e4a90 | ||
|
|
b4c96cc543 | ||
|
|
1e27efd7af | ||
|
|
12d5849e25 | ||
|
|
663a7bb39e | ||
|
|
2cf8c7d62e | ||
|
|
34c80df5ae | ||
|
|
62a52c8974 | ||
|
|
971f0c9347 | ||
|
|
f4b41df38e | ||
|
|
6af295ebcb | ||
|
|
d7ed1c8530 | ||
|
|
ea8ee67784 | ||
|
|
2c0e913e86 | ||
|
|
17fa5af480 | ||
|
|
850a17807c | ||
|
|
c2ed93e92b | ||
|
|
c144c345c5 | ||
|
|
a20a1facb0 | ||
|
|
45205c1906 | ||
|
|
13762a05b8 | ||
|
|
2c42499788 | ||
|
|
b0c111170e | ||
|
|
08b15c4fe6 | ||
|
|
94cfcfe5e2 | ||
|
|
cf06a395de | ||
|
|
023770f63e | ||
|
|
95dff2536b | ||
|
|
7ce1eda3a7 | ||
|
|
96e4b26635 | ||
|
|
525f75a1a7 | ||
|
|
9200b37610 | ||
|
|
44d745d534 | ||
|
|
ee287ce00b | ||
|
|
e259d62e18 | ||
|
|
2514aed55c | ||
|
|
3c4f361c7a | ||
|
|
a4391bc320 | ||
|
|
80ae850063 | ||
|
|
bf4d973097 | ||
|
|
8bbebe9dea | ||
|
|
0eca5c56ac | ||
|
|
fa18824a8a | ||
|
|
ffcec02aa6 | ||
|
|
312dd2f4a6 | ||
|
|
7e52f74d2a | ||
|
|
1241818d5e | ||
|
|
d474791e1d | ||
|
|
bdf92ffb06 | ||
|
|
85f8f581bc | ||
|
|
76c11e3c97 | ||
|
|
02c2579366 | ||
|
|
6c5f95c6bf | ||
|
|
424243e500 | ||
|
|
b725c92922 | ||
|
|
1bcf6f73a4 | ||
|
|
483b49f5ee | ||
|
|
d790fa398f | ||
|
|
23e7df2796 | ||
|
|
ba502a9d39 | ||
|
|
3ce9621715 | ||
|
|
7806da0448 | ||
|
|
d533bc450f | ||
|
|
b91c3dab2d | ||
|
|
b0a541226e | ||
|
|
dbfb911826 | ||
|
|
fc33dfe656 | ||
|
|
ab48b8232b | ||
|
|
8ab12b29a6 | ||
|
|
035f7b2605 | ||
|
|
7081a56113 | ||
|
|
da9979f887 | ||
|
|
e6c53e77b7 | ||
|
|
0ea834788e | ||
|
|
c13e977291 | ||
|
|
d3dc939a14 | ||
|
|
fd00346eee | ||
|
|
a04ad5c689 | ||
|
|
484b13ba41 | ||
|
|
e1b949d958 | ||
|
|
af0829a7a2 | ||
|
|
34585da510 | ||
|
|
8f7a754d58 | ||
|
|
d93ba45515 | ||
|
|
314b47d8e6 | ||
|
|
5f88448bf6 | ||
|
|
6fb09175d0 | ||
|
|
7dd3ed4553 | ||
|
|
c5a921ae76 | ||
|
|
7e8936667f | ||
|
|
6329deef54 | ||
|
|
ce4794e0b2 | ||
|
|
3cfda459a8 | ||
|
|
6641100cbd | ||
|
|
962ae8a013 | ||
|
|
ead8087cff | ||
|
|
9af1bbe286 | ||
|
|
4827e0788c | ||
|
|
c8dfecf79c | ||
|
|
6285a33ee5 | ||
|
|
2ab7252beb | ||
|
|
d1c1f284ab | ||
|
|
ddcdf73c30 | ||
|
|
6ab939fbe0 | ||
|
|
1d7d7deaed | ||
|
|
c2e775666a | ||
|
|
d358e4274c | ||
|
|
ca8efa52c4 | ||
|
|
eeb82630c4 | ||
|
|
831695f288 | ||
|
|
e10fa5050a | ||
|
|
46ead9fa53 | ||
|
|
8e02230827 | ||
|
|
a924fc252b | ||
|
|
7cf24cb080 | ||
|
|
45518150e6 | ||
|
|
c734109321 | ||
|
|
0f38783f0d | ||
|
|
cd6378316f | ||
|
|
3098f5a097 | ||
|
|
b014a975a4 | ||
|
|
cce81cabff | ||
|
|
08a985d183 | ||
|
|
816126b13a | ||
|
|
f2a6278daa | ||
|
|
c1efc0e066 | ||
|
|
236897cfcc | ||
|
|
73b4569c07 | ||
|
|
25de66ed80 | ||
|
|
a2bbf6cff8 | ||
|
|
01367d0731 | ||
|
|
fedc993e57 | ||
|
|
b597240cfd | ||
|
|
127c9fe8f4 | ||
|
|
ffc35fb5ab | ||
|
|
aa7639485e | ||
|
|
a4267d4f77 | ||
|
|
12880db557 | ||
|
|
881d7f2f51 | ||
|
|
93335978ea | ||
|
|
64f62583ce | ||
|
|
5530d3051b | ||
|
|
42326ec708 | ||
|
|
aa54e3c673 | ||
|
|
5ce7f4faa5 | ||
|
|
6d20a438db | ||
|
|
7f662a93df | ||
|
|
1758a0cd2e | ||
|
|
9b003b5428 | ||
|
|
db7fdd57e4 | ||
|
|
689da52ddf | ||
|
|
2a1e2d7d6c | ||
|
|
cf8af91516 | ||
|
|
c9ff941600 | ||
|
|
d389f89c49 | ||
|
|
e05114806a | ||
|
|
3074494131 | ||
|
|
a9e161181c | ||
|
|
f9db0ab8f9 | ||
|
|
94cc77b848 | ||
|
|
f16bec1e0a | ||
|
|
e2c24abf62 | ||
|
|
50e3aa1f61 | ||
|
|
3c15588292 | ||
|
|
fdab158290 | ||
|
|
921726e0b8 | ||
|
|
b5e49df180 | ||
|
|
49fd4acef8 | ||
|
|
73aa377264 | ||
|
|
74e909d17f | ||
|
|
4b3c150004 | ||
|
|
5ee7948071 | ||
|
|
f653317e5b | ||
|
|
de43299841 | ||
|
|
e6f5d76abe | ||
|
|
fecd1eb505 | ||
|
|
9536a8ec64 | ||
|
|
06a12246f5 | ||
|
|
456b660b2a | ||
|
|
5b81f6a977 | ||
|
|
c854df8ffa | ||
|
|
22a34d8d68 | ||
|
|
0f8969e076 | ||
|
|
f164e889cc | ||
|
|
1e2a331518 | ||
|
|
158ff62aaa | ||
|
|
79af8a46d1 | ||
|
|
200bf3229c | ||
|
|
e0b7d4cc60 | ||
|
|
4fe11b5ea9 | ||
|
|
0b590ab147 | ||
|
|
7a20bb4deb | ||
|
|
c87c242098 | ||
|
|
eb92182230 | ||
|
|
5b9efaa2a0 | ||
|
|
58f7e6f1fe | ||
|
|
9538dcb6e7 | ||
|
|
0080f55ef8 | ||
|
|
aac91e8763 | ||
|
|
5c0adf9a28 | ||
|
|
9963a99868 | ||
|
|
515a531abf | ||
|
|
d3d16ab7b6 | ||
|
|
d08027360f | ||
|
|
70f6ede7b8 | ||
|
|
c1c70a53be | ||
|
|
f89bfba5dc | ||
|
|
c1a66bf9e7 | ||
|
|
e98c725043 | ||
|
|
ad527a7033 | ||
|
|
59706d4698 | ||
|
|
7addef4f5f | ||
|
|
08d0a378f8 | ||
|
|
01381ed084 | ||
|
|
2c72908f76 | ||
|
|
32ba71693c | ||
|
|
7fff3192a6 | ||
|
|
83aa818c00 | ||
|
|
56d61bdef3 | ||
|
|
ebd86b32bd | ||
|
|
08c718d232 | ||
|
|
512831dea9 | ||
|
|
a36bbb0cda | ||
|
|
8a9e0f0b01 | ||
|
|
076fd69131 | ||
|
|
587f7f544e | ||
|
|
178c486b83 | ||
|
|
ad1748b8be | ||
|
|
004f88dae9 | ||
|
|
97fe824b80 | ||
|
|
758176dd32 | ||
|
|
854c1980cc | ||
|
|
840002b63a | ||
|
|
47a447dbb0 | ||
|
|
a1d47cf64a | ||
|
|
a5bb4c1874 | ||
|
|
22b593215f | ||
|
|
68181acec7 | ||
|
|
3af35fa610 | ||
|
|
2c12d4f2de | ||
|
|
bbac9c559c | ||
|
|
03eaa62902 | ||
|
|
dcca5ed469 | ||
|
|
2aa46f5a52 | ||
|
|
ff3c27ab20 | ||
|
|
833408c663 | ||
|
|
38d9f98221 | ||
|
|
ac4b4266b4 | ||
|
|
b90bbd9dcf | ||
|
|
e8f69e197c | ||
|
|
9922a7095b | ||
|
|
3c836144e2 | ||
|
|
8c4a593fb0 | ||
|
|
0e282833e6 | ||
|
|
54753caf94 | ||
|
|
fcba3bed95 | ||
|
|
d348ac66de | ||
|
|
fd4f5e7d51 | ||
|
|
c77fcd2cbc | ||
|
|
ee385abfef | ||
|
|
49335ba8a8 | ||
|
|
8ac186ce17 | ||
|
|
ca2322a4da | ||
|
|
a1e7afac76 | ||
|
|
2f75092d8b | ||
|
|
6f9e710ec9 | ||
|
|
0b12d160bb | ||
|
|
330b45a1ed | ||
|
|
5f0a0d0363 | ||
|
|
ad01c2d966 | ||
|
|
fb5ed82401 | ||
|
|
eaa7f10b36 | ||
|
|
f2c8dbe57a | ||
|
|
447b0459aa | ||
|
|
e31c64e42e | ||
|
|
32411b2a90 | ||
|
|
32f850556e | ||
|
|
fd94f53e25 | ||
|
|
4aa7e06a56 | ||
|
|
033b76af14 | ||
|
|
e37a5f4d06 | ||
|
|
58e12e0141 | ||
|
|
147678b0f0 | ||
|
|
e6cbd00871 | ||
|
|
1eb7458af9 | ||
|
|
38cf5b82b2 | ||
|
|
a5c59c4b77 | ||
|
|
d190cc6e40 | ||
|
|
8234ce1e5f | ||
|
|
e962e4e1f5 | ||
|
|
ee970a3fce | ||
|
|
9242faaa49 | ||
|
|
b813f7ee56 | ||
|
|
7f64ef05d5 | ||
|
|
9cb593c9e4 | ||
|
|
cfb343d262 | ||
|
|
9c811c2318 | ||
|
|
7b97ad6e2f | ||
|
|
fdea2a2e92 | ||
|
|
aa0085b57d | ||
|
|
3fa489c0f9 | ||
|
|
fbee409f47 | ||
|
|
7a8aa4eb84 | ||
|
|
d4bbaa41c3 | ||
|
|
bb23fe159f | ||
|
|
b1a02389f6 | ||
|
|
f10ddcaa17 | ||
|
|
77f0ce0673 | ||
|
|
7fc486757d | ||
|
|
dfc3fdb88b | ||
|
|
3769bd2a68 | ||
|
|
80d1b3b204 | ||
|
|
e66fd28831 | ||
|
|
1cabf5c31e | ||
|
|
8341f8cb6a | ||
|
|
1fc36fce9b | ||
|
|
33dbb07559 | ||
|
|
e510c50a24 | ||
|
|
c345035e12 | ||
|
|
9bb4789b32 | ||
|
|
7e26814cfa | ||
|
|
33855cfbee | ||
|
|
98bb3e0366 | ||
|
|
52744fb784 | ||
|
|
08e5208835 | ||
|
|
187079842f | ||
|
|
ef2c5d2df6 | ||
|
|
92a0a9c197 | ||
|
|
90e46f535c | ||
|
|
02fc573e31 | ||
|
|
b8c7223da7 | ||
|
|
7b53e25dd5 | ||
|
|
f8f9d2f65c | ||
|
|
19e12701f3 | ||
|
|
24c7311162 | ||
|
|
599914934c | ||
|
|
8fdc66d138 | ||
|
|
83caae7586 | ||
|
|
1f599e62c6 | ||
|
|
4e174fd5bf | ||
|
|
edf3560dd5 | ||
|
|
7452bf39fb | ||
|
|
c2bac6d1ef | ||
|
|
47cd8ccfc8 | ||
|
|
ec6cab28a5 | ||
|
|
45de1067bd | ||
|
|
7ab04b0bcb | ||
|
|
1a71d44b43 | ||
|
|
1ea273fba0 | ||
|
|
591be6c2fd | ||
|
|
6b02457190 | ||
|
|
87e5b6d41e | ||
|
|
7f0c506fea | ||
|
|
539c2df378 | ||
|
|
4399e2ab31 | ||
|
|
210eeff481 | ||
|
|
95e72dd339 | ||
|
|
a6d9369204 | ||
|
|
ab80045329 | ||
|
|
94aaeac194 | ||
|
|
4bec5cef01 | ||
|
|
1500d213e7 | ||
|
|
2dbe61789d | ||
|
|
3f9bed938e | ||
|
|
619d27da81 | ||
|
|
bfd0f6e744 | ||
|
|
6d71cabbda | ||
|
|
317664f88c | ||
|
|
e7cddd47a5 | ||
|
|
393dfae33e | ||
|
|
c69ea0e4d8 | ||
|
|
59fdcf0ae9 | ||
|
|
f22ea9eb21 | ||
|
|
752588ffcd | ||
|
|
a0f6d7d361 | ||
|
|
1b5232c2d0 | ||
|
|
089e68e85e | ||
|
|
a9ec7cff4f | ||
|
|
63c2b3642c | ||
|
|
5e04124211 | ||
|
|
bbfd4ac280 | ||
|
|
28fd0ba201 | ||
|
|
305c026f4e | ||
|
|
b836042a02 | ||
|
|
ec95b6bfbe | ||
|
|
6049ecfc6e | ||
|
|
6a31381c8e | ||
|
|
7f8bcf8075 | ||
|
|
b84a47ad3f | ||
|
|
f91d0c1693 | ||
|
|
cd65424b00 | ||
|
|
944e0f24ae | ||
|
|
d396a45e64 | ||
|
|
c0d5ebaaf3 | ||
|
|
c3b42cc297 | ||
|
|
4f32d436bb | ||
|
|
4268a875fa | ||
|
|
2ec2ef8bbf | ||
|
|
7ba29029e1 | ||
|
|
bbdbe62930 | ||
|
|
b95241dcfe | ||
|
|
8cc1cd6f2c | ||
|
|
f7947b3fe3 | ||
|
|
4c06dd7107 | ||
|
|
d6db83805d | ||
|
|
25f4d0199d | ||
|
|
3bcd5cf308 | ||
|
|
ce38cf9040 | ||
|
|
adc2704da0 | ||
|
|
f999d87f68 | ||
|
|
7f8446ab82 | ||
|
|
4d2b61a766 | ||
|
|
1f3661238a | ||
|
|
5f236d4d42 | ||
|
|
8fb3856ea6 | ||
|
|
418985f90b | ||
|
|
2c738fa28e | ||
|
|
8a8ac2e3d1 | ||
|
|
cf65fd890d | ||
|
|
6a86fc8067 | ||
|
|
528039f80b | ||
|
|
b5875ae890 | ||
|
|
8801834804 | ||
|
|
a14a2c9684 | ||
|
|
269e73168e | ||
|
|
19eec6305b | ||
|
|
9930d50f99 | ||
|
|
9427137dbd | ||
|
|
c10fd17d19 | ||
|
|
3c26b98b65 | ||
|
|
6e357459e6 | ||
|
|
fe42511c54 | ||
|
|
32f507ce15 |
No files matched your search
@@ -1,4 +1,4 @@
|
||||
name: Build branch
|
||||
name: "Builds"
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -10,8 +10,68 @@ concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build-all:
|
||||
uses: ./.github/workflows/shared-build.yml
|
||||
with:
|
||||
environment: "testing"
|
||||
environment: 'testing'
|
||||
|
||||
# Initially create a release with 1 job
|
||||
# so multiple files can be uploaded at the same time afterwards
|
||||
create-release:
|
||||
if: github.event_name != 'pull_request' && github.ref_name == 'main'
|
||||
runs-on: ubuntu-24.04
|
||||
environment: 'testing'
|
||||
needs: [build-all]
|
||||
|
||||
steps:
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2.3.2
|
||||
with:
|
||||
prerelease: true
|
||||
name: '${{github.ref_name}}-${{github.sha}}'
|
||||
tag_name: 'dev'
|
||||
|
||||
deploy-release:
|
||||
if: github.event_name != 'pull_request' && github.ref_name == 'main'
|
||||
strategy:
|
||||
matrix:
|
||||
target_os: [
|
||||
'linux-amd64',
|
||||
'linux-i686',
|
||||
'linux-arm64',
|
||||
'linux-armhf',
|
||||
'linux-powerpc',
|
||||
'linux-ppc64',
|
||||
'linux-ppc64el',
|
||||
'windows-x64-pdb',
|
||||
'windows-x86-pdb',
|
||||
'windows-arm64-pdb',
|
||||
'macos-multiarch-arm64-x86_64',
|
||||
]
|
||||
|
||||
runs-on: ubuntu-24.04
|
||||
environment: 'testing'
|
||||
needs: [create-release]
|
||||
|
||||
env:
|
||||
RELEASE_NAME: ${{github.event.repository.name}}-dev-${{matrix.target_os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: 'out-${{matrix.target_os}}'
|
||||
path: ${{github.workspace}}/${{matrix.target_os}}
|
||||
|
||||
- name: Zip
|
||||
working-directory: '${{github.workspace}}/${{matrix.target_os}}'
|
||||
run: zip -9 -r "../${{env.RELEASE_NAME}}.zip" ./
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2.3.2
|
||||
with:
|
||||
tag_name: 'dev'
|
||||
files: ${{github.workspace}}/${{env.RELEASE_NAME}}.zip
|
||||
@@ -0,0 +1,60 @@
|
||||
name: "Generate Documentation"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get and install Doxygen
|
||||
run: |
|
||||
wget https://github.com/doxygen/doxygen/releases/download/Release_1_16_1/doxygen-1.16.1.linux.bin.tar.gz -O doxygen.tar.gz
|
||||
tar xzf doxygen.tar.gz
|
||||
cd doxygen-*
|
||||
sudo cp bin/doxygen /usr/local/bin/
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: 'source'
|
||||
|
||||
- name: Generate Documentation (Doxygen)
|
||||
working-directory: ${{github.workspace}}/source
|
||||
run: |
|
||||
version_file=$(cat code/qcommon/q_version.h)
|
||||
PRODUCT_VERSION_MAJOR=$(echo "$version_file" | grep -E "define[ \t]+PRODUCT_VERSION_MAJOR" | awk -F'[ \t]+' '{print $3""}' | tr -d '\r\n')
|
||||
PRODUCT_VERSION_MINOR=$(echo "$version_file" | grep -E "define[ \t]+PRODUCT_VERSION_MINOR" | awk -F'[ \t]+' '{print $3""}' | tr -d '\r\n')
|
||||
PRODUCT_VERSION_PATCH=$(echo "$version_file" | grep -E "define[ \t]+PRODUCT_VERSION_PATCH" | awk -F'[ \t]+' '{print $3""}' | tr -d '\r\n')
|
||||
export PROJECT_VERSION_NUMBER="$PRODUCT_VERSION_MAJOR.$PRODUCT_VERSION_MINOR.$PRODUCT_VERSION_PATCH"
|
||||
doxygen docs/Doxyfile
|
||||
|
||||
- name: Upload static files as artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: ${{github.workspace}}/source/docs/doxygen/html
|
||||
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
|
||||
# Permissions for deploying the page
|
||||
permissions:
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
@@ -47,6 +47,12 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
name: Install required packages
|
||||
with:
|
||||
packages: libopenal-dev libpulse-dev portaudio19-dev libasound2-dev libjack-dev libpipewire-0.3-dev qtbase5-dev libdbus-1-dev
|
||||
version: "0.1"
|
||||
|
||||
# Setup SDL
|
||||
- name: Set up SDL
|
||||
id: sdl
|
||||
|
||||
@@ -0,0 +1,260 @@
|
||||
##########################
|
||||
#
|
||||
# Linux
|
||||
# Ubuntu 22.04
|
||||
#
|
||||
# Using this version instead of 24.04 to use a lower GLIBC version (2.34).
|
||||
# ARM is used for more efficiency, and x64 is used for legacy architectures like PowerPC.
|
||||
##########################
|
||||
name: "Linux Builds"
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
environment:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: RelWithDebInfo
|
||||
RELEASE_STAGE: ${{ vars.RELEASE_STAGE || 'unstable' }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
architecture: [
|
||||
{name: 'amd64', os: "ubuntu-22.04-arm", package: 'x86-64-linux-gnu', triple: 'x86_64-linux-gnu', arch_option: 'linux-x86_64'},
|
||||
{name: 'i686', os: "ubuntu-22.04-arm", package: 'i686-linux-gnu', triple: 'i686-linux-gnu', arch_option: 'linux-x86'},
|
||||
{name: 'arm64', os: "ubuntu-22.04-arm", package: 'aarch64-linux-gnu', triple: 'aarch64-linux-gnu', arch_option: 'linux-aarch64'},
|
||||
{name: 'armhf', os: "ubuntu-22.04-arm", package: 'arm-linux-gnueabihf', triple: 'arm-linux-gnueabihf', arch_option: 'linux-armv4'},
|
||||
{name: 'powerpc', os: "ubuntu-22.04", package: 'powerpc-linux-gnu', triple: 'powerpc-linux-gnu', arch_option: 'linux-ppc'},
|
||||
{name: 'ppc64', os: "ubuntu-22.04", package: 'powerpc64-linux-gnu', triple: 'powerpc64-linux-gnu', arch_option: 'linux-ppc64'},
|
||||
{name: 'ppc64el', os: "ubuntu-22.04-arm", package: 'powerpc64le-linux-gnu', triple: 'powerpc64le-linux-gnu', arch_option: 'linux-ppc64le'}
|
||||
]
|
||||
|
||||
name: "Building for platform linux-${{matrix.architecture.name}}"
|
||||
runs-on: ${{ matrix.architecture.os }}
|
||||
environment: ${{ inputs.environment }}
|
||||
env:
|
||||
wolfssl-version: 'v5.7.6-stable'
|
||||
curl-version: '8_12_1'
|
||||
openal-soft-branch: '1.24.3'
|
||||
sdl2-branch: 'release-2.32.8'
|
||||
|
||||
steps:
|
||||
###
|
||||
# Packages
|
||||
###
|
||||
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
name: Install required packages
|
||||
with:
|
||||
packages: flex bison ninja-build cmake clang libpulse-dev portaudio19-dev libasound2-dev libjack-dev libpipewire-0.3-dev qtbase5-dev libdbus-1-dev
|
||||
version: "${{ runner.os }}-${{ runner.arch }}-v1"
|
||||
|
||||
- name: Settings
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
echo "HOST_TRIPLE=$(gcc -dumpmachine)" >> $GITHUB_ENV
|
||||
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
name: Install required cross-platform packages (${{ matrix.architecture.package }})
|
||||
if: env.HOST_TRIPLE != matrix.architecture.triple
|
||||
with:
|
||||
packages: gcc-12-${{ matrix.architecture.package }} g++-12-${{ matrix.architecture.package }}
|
||||
version: "${{ runner.os }}-${{ runner.arch }}-v1"
|
||||
|
||||
- name: Settings
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
echo "CMAKE_GENERATOR=Ninja Multi-Config" >> $GITHUB_ENV
|
||||
echo "CC=clang" >> $GITHUB_ENV
|
||||
echo "CXX=clang++" >> $GITHUB_ENV
|
||||
echo "CFLAGS='--target=${{ matrix.architecture.triple }}'" >> $GITHUB_ENV
|
||||
echo "CXXFLAGS='--target=${{ matrix.architecture.triple }}'" >> $GITHUB_ENV
|
||||
|
||||
###
|
||||
# SDL
|
||||
###
|
||||
|
||||
# Cache SDL
|
||||
- name: Cache SDL2
|
||||
id: cache-sdl2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: 'thirdparties/SDL2/install'
|
||||
key: ${{ runner.os }}-${{ matrix.architecture.name }}-sdl2-${{ env.sdl2-branch }}-v1
|
||||
|
||||
# SDL2 setup
|
||||
- name: Checkout SDL2
|
||||
if: steps.cache-sdl2.outputs.cache-hit != 'true'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'libsdl-org/SDL'
|
||||
path: 'thirdparties/SDL2'
|
||||
ref: '${{ env.sdl2-branch }}'
|
||||
|
||||
- name: Configure and install SDL2
|
||||
if: steps.cache-sdl2.outputs.cache-hit != 'true'
|
||||
working-directory: ${{github.workspace}}/thirdparties/SDL2
|
||||
run: |
|
||||
cmake -B ./build \
|
||||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/thirdparties/SDL2/install'
|
||||
cmake --build ./build --config Release --parallel
|
||||
cmake --install ./build --config Release
|
||||
|
||||
###
|
||||
# OpenAL
|
||||
###
|
||||
- name: Cache OpenAL
|
||||
id: cache-openal-soft
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: 'thirdparties/soft-oal/install'
|
||||
key: ${{ runner.os }}-${{ matrix.architecture.name }}-openal-soft-${{ env.openal-soft-branch }}-v1
|
||||
|
||||
# soft-oal setup
|
||||
- name: Checkout soft-oal
|
||||
if: steps.cache-openal-soft.outputs.cache-hit != 'true'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'kcat/openal-soft'
|
||||
path: 'thirdparties/soft-oal'
|
||||
ref: '${{ env.openal-soft-branch }}'
|
||||
|
||||
- name: Configure and install soft-oal
|
||||
if: steps.cache-openal-soft.outputs.cache-hit != 'true'
|
||||
working-directory: ${{github.workspace}}/thirdparties/soft-oal
|
||||
run: |
|
||||
cmake -B ./build \
|
||||
-DALSOFT_UTILS=OFF \
|
||||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/thirdparties/soft-oal/install'
|
||||
cmake --build ./build --config Release --parallel
|
||||
cmake --install ./build --config Release
|
||||
|
||||
###
|
||||
# WolfSSL
|
||||
###
|
||||
- name: Cache WolfSSL
|
||||
id: cache-wolfssl
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: 'thirdparties/wolfssl/install'
|
||||
key: ${{ runner.os }}-${{ matrix.architecture.name }}-wolfssl-${{ env.wolfssl-version }}-v1
|
||||
|
||||
# WolfSSL setup
|
||||
- name: Checkout WolfSSL
|
||||
if: steps.cache-wolfssl.outputs.cache-hit != 'true'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'wolfssl/wolfssl'
|
||||
path: 'thirdparties/wolfssl'
|
||||
ref: '${{ env.wolfssl-version }}'
|
||||
|
||||
# WolfSSL build
|
||||
- name: Configure and install wolfssl
|
||||
if: steps.cache-wolfssl.outputs.cache-hit != 'true'
|
||||
working-directory: ${{github.workspace}}/thirdparties/wolfssl
|
||||
run: |
|
||||
cmake -B ./build \
|
||||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/thirdparties/wolfssl/install' \
|
||||
-DCMAKE_C_FLAGS="$CFLAGS -fPIC" \
|
||||
-DCMAKE_CXX_FLAGS="$CFLAGS -fPIC" \
|
||||
-DBUILD_SHARED_LIBS=OFF -DWOLFSSL_OPENSSLEXTRA=ON -DWOLFSSL_ASM=OFF -DWOLFSSL_EXAMPLES=OFF -DWOLFSSL_CURL=ON
|
||||
cmake --build ./build --config Release --parallel
|
||||
cmake --install ./build --config Release
|
||||
|
||||
###
|
||||
# cURL
|
||||
###
|
||||
- name: Cache cURL
|
||||
id: cache-curl
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: 'thirdparties/curl/install'
|
||||
key: ${{ runner.os }}-${{ matrix.architecture.name }}-curl-${{ env.curl-version }}-v1
|
||||
|
||||
# cURL setup
|
||||
- name: Checkout cURL
|
||||
if: steps.cache-curl.outputs.cache-hit != 'true'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'curl/curl'
|
||||
path: 'thirdparties/curl'
|
||||
ref: 'curl-${{ env.curl-version }}'
|
||||
|
||||
# cURL build
|
||||
- name: Configure and install curl
|
||||
if: steps.cache-curl.outputs.cache-hit != 'true'
|
||||
working-directory: ${{github.workspace}}/thirdparties/curl
|
||||
run: |
|
||||
cmake -B ./build \
|
||||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/thirdparties/curl/install' \
|
||||
-DCURL_USE_LIBPSL=OFF \
|
||||
-DCURL_USE_WOLFSSL=ON \
|
||||
-DCURL_ZLIB="" \
|
||||
-DCURL_BROTLI="" \
|
||||
-DCURL_ZSTD="" \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="-lm" \
|
||||
-DWolfSSL_ROOT='${{github.workspace}}/thirdparties/wolfssl/install'
|
||||
cmake --build ./build --config Release --parallel
|
||||
cmake --install ./build --config Release
|
||||
|
||||
###
|
||||
# Project
|
||||
###
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
path: 'source'
|
||||
|
||||
- name: CMake Settings
|
||||
run: |
|
||||
echo "CMAKE_PARAM=--log-level=VERBOSE \
|
||||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/install' \
|
||||
-DUSE_INTERNAL_SDL=OFF \
|
||||
-DSDL2_DIR='${{github.workspace}}/thirdparties/SDL2/install/lib/cmake/SDL2' \
|
||||
-DOPENAL_LIBRARY='${{github.workspace}}/thirdparties/soft-oal' \
|
||||
-DOPENAL_INCLUDE_DIR='${{github.workspace}}/thirdparties/soft-oal/install/include' \
|
||||
-DCURL_ROOT='${{github.workspace}}/thirdparties/curl/install' \
|
||||
-DUSE_RENDERER_DLOPEN=OFF \
|
||||
-DBUILD_RENDERER_GL2=OFF \
|
||||
-DGIT_REVISION_BUILD_NUMBER=${{ github.run_number }} \
|
||||
-DPRODUCT_VERSION_STAGE='${{ env.RELEASE_STAGE }}'" >> $GITHUB_ENV
|
||||
|
||||
- name: Configure CMake
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
cmake -B ./build ${{ env.CMAKE_PARAM }} ./source
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
|
||||
|
||||
- name: Install
|
||||
working-directory: ${{github.workspace}}
|
||||
# Install to the directory defined in CMAKE_INSTALL_PREFIX
|
||||
run: |
|
||||
cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
||||
# Copy libraries
|
||||
mkdir ${{github.workspace}}/package
|
||||
cp -l ${{github.workspace}}/thirdparties/SDL2/install/lib/libSDL2-2.0.so.0 '${{github.workspace}}/package/'
|
||||
cp -l ${{github.workspace}}/thirdparties/soft-oal/install/lib/libopenal.so.1 '${{github.workspace}}/package/'
|
||||
cp -l ${{github.workspace}}/thirdparties/curl/install/lib*/libcurl.so.4 '${{github.workspace}}/package/'
|
||||
if [ -d ${{github.workspace}}/install/bin ]; then cp -r ${{github.workspace}}/install/bin/openmohaa/. '${{github.workspace}}/package'; fi
|
||||
if [ -d ${{github.workspace}}/install/lib ]; then cp -r ${{github.workspace}}/install/lib/openmohaa/. '${{github.workspace}}/package'; fi
|
||||
|
||||
###
|
||||
# Artifacts
|
||||
###
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: out-linux-${{matrix.architecture.name}}
|
||||
if-no-files-found: error
|
||||
compression-level: 9
|
||||
path:
|
||||
${{github.workspace}}/package
|
||||
@@ -0,0 +1,257 @@
|
||||
##########################
|
||||
#
|
||||
# Apple macOS
|
||||
# macOS 15
|
||||
#
|
||||
# This version is used as the OS, as it's faster than other versions.
|
||||
##########################
|
||||
name: "macOS Builds"
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
environment:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: RelWithDebInfo
|
||||
RELEASE_STAGE: ${{ vars.RELEASE_STAGE || 'unstable' }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
architecture: [
|
||||
#{name: 'x86_64', triple: 'x86_64-apple-macos10.8'},
|
||||
#{name: 'arm64', triple: 'arm64-apple-macos11'}
|
||||
#{name: 'x86_64', build_name: 'x86_64'},
|
||||
#{name: 'arm64', build_name: 'arm64'},
|
||||
# Compile into an universal binary
|
||||
{name: 'multiarch-arm64-x86_64', build_name: 'arm64;x86_64' }
|
||||
]
|
||||
|
||||
name: "Building for platform macos-${{matrix.architecture.name}}"
|
||||
runs-on: "macos-15"
|
||||
env:
|
||||
openal-soft-branch: '1.24.3'
|
||||
wolfssl-version: 'v5.7.6-stable'
|
||||
curl-version: '8_12_1'
|
||||
sdl2-branch: 'release-2.32.8'
|
||||
|
||||
steps:
|
||||
###
|
||||
# Packages
|
||||
###
|
||||
|
||||
- name: Install required packages
|
||||
run: |
|
||||
brew install flex bison llvm
|
||||
# Those packages are already installed
|
||||
#brew install git ninja cmake perl
|
||||
|
||||
- name: Settings
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
echo "CMAKE_GENERATOR=Ninja Multi-Config" >> $GITHUB_ENV
|
||||
echo "CC=clang" >> $GITHUB_ENV
|
||||
echo "CXX=clang++" >> $GITHUB_ENV
|
||||
echo "MACOSX_DEPLOYMENT_TARGET=10.15" >> $GITHUB_ENV
|
||||
|
||||
###
|
||||
# SDL
|
||||
###
|
||||
|
||||
# Cache SDL
|
||||
- name: Cache SDL2
|
||||
id: cache-sdl2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: 'thirdparties/SDL2/install'
|
||||
key: ${{ runner.os }}-${{ matrix.architecture.name }}-sdl2-${{ env.sdl2-branch }}-v1
|
||||
|
||||
# SDL2 setup
|
||||
- name: Checkout SDL2
|
||||
if: steps.cache-sdl2.outputs.cache-hit != 'true'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'libsdl-org/SDL'
|
||||
path: 'thirdparties/SDL2'
|
||||
ref: '${{ env.sdl2-branch }}'
|
||||
|
||||
- name: Configure and install SDL2
|
||||
if: steps.cache-sdl2.outputs.cache-hit != 'true'
|
||||
working-directory: ${{github.workspace}}/thirdparties/SDL2
|
||||
run: |
|
||||
cmake -B ./build \
|
||||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/thirdparties/SDL2/install' \
|
||||
-DCMAKE_OSX_ARCHITECTURES='${{ matrix.architecture.build_name }}'
|
||||
cmake --build ./build --config Release --parallel
|
||||
cmake --install ./build --config Release
|
||||
|
||||
###
|
||||
# OpenAL
|
||||
###
|
||||
- name: Cache OpenAL
|
||||
id: cache-openal-soft
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: 'thirdparties/soft-oal/install'
|
||||
key: ${{ runner.os }}-${{ matrix.architecture.name }}-openal-soft-${{ env.openal-soft-branch }}-v1
|
||||
|
||||
# soft-oal setup
|
||||
# Use GCC instead of Clang because of missing SSE intrinsics
|
||||
# It also doesn't enable altivec support on PowerPC by default
|
||||
- name: Checkout soft-oal
|
||||
if: steps.cache-openal-soft.outputs.cache-hit != 'true'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'kcat/openal-soft'
|
||||
path: 'thirdparties/soft-oal'
|
||||
ref: '${{ env.openal-soft-branch }}'
|
||||
|
||||
# soft-oal build
|
||||
- name: Configure and install soft-oal
|
||||
if: steps.cache-openal-soft.outputs.cache-hit != 'true'
|
||||
working-directory: ${{github.workspace}}/thirdparties/soft-oal
|
||||
run: |
|
||||
cmake -B ./build \
|
||||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/thirdparties/soft-oal/install' \
|
||||
-DCMAKE_OSX_ARCHITECTURES='${{ matrix.architecture.build_name }}' \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=on
|
||||
cmake --build ./build --config Release --parallel
|
||||
cmake --install ./build --config Release
|
||||
|
||||
###
|
||||
# WolfSSL
|
||||
###
|
||||
# FIXME: Figure out how to compile WolfSSL cross-architecture
|
||||
#
|
||||
# - name: Cache WolfSSL
|
||||
# id: cache-wolfssl
|
||||
# uses: actions/cache@v4
|
||||
# with:
|
||||
# path: 'thirdparties/wolfssl_install'
|
||||
# key: ${{ runner.os }}-${{ matrix.architecture.name }}-wolfssl-${{ env.wolfssl-version }}-v1
|
||||
#
|
||||
# # WolfSSL setup
|
||||
# - name: Checkout WolfSSL
|
||||
# if: steps.cache-wolfssl.outputs.cache-hit != 'true'
|
||||
# uses: actions/checkout@v4
|
||||
# with:
|
||||
# repository: 'wolfssl/wolfssl'
|
||||
# path: 'thirdparties/wolfssl'
|
||||
# ref: '${{ env.wolfssl-version }}'
|
||||
#
|
||||
# # WolfSSL build
|
||||
# - name: Configure and install wolfssl
|
||||
# if: steps.cache-wolfssl.outputs.cache-hit != 'true'
|
||||
# working-directory: ${{github.workspace}}/thirdparties/wolfssl
|
||||
# run: |
|
||||
# cmake -B ./build \
|
||||
# -DCMAKE_INSTALL_PREFIX='${{github.workspace}}/thirdparties/wolfssl_install' \
|
||||
# -DCMAKE_OSX_ARCHITECTURES='${{ matrix.architecture.build_name }}' \
|
||||
# -DBUILD_SHARED_LIBS=OFF -DWOLFSSL_OPENSSLEXTRA=ON -DWOLFSSL_ASM=OFF -DWOLFSSL_EXAMPLES=OFF -DWOLFSSL_CURL=ON
|
||||
# cmake --build ./build --config Release --parallel
|
||||
# cmake --install ./build --config Release
|
||||
|
||||
###
|
||||
# cURL
|
||||
###
|
||||
- name: Cache cURL
|
||||
id: cache-curl
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: 'thirdparties/curl/install'
|
||||
key: ${{ runner.os }}-${{ matrix.architecture.name }}-curl-${{ env.curl-version }}-v1
|
||||
|
||||
# cURL setup
|
||||
- name: Checkout cURL
|
||||
if: steps.cache-curl.outputs.cache-hit != 'true'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'curl/curl'
|
||||
path: 'thirdparties/curl'
|
||||
ref: 'curl-${{ env.curl-version }}'
|
||||
|
||||
# cURL build
|
||||
- name: Configure and install curl
|
||||
if: steps.cache-curl.outputs.cache-hit != 'true'
|
||||
working-directory: ${{github.workspace}}/thirdparties/curl
|
||||
run: |
|
||||
cmake -B ./build \
|
||||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/thirdparties/curl/install' \
|
||||
-DCMAKE_OSX_ARCHITECTURES='${{ matrix.architecture.build_name }}' \
|
||||
-DCURL_USE_LIBPSL=OFF \
|
||||
-DCURL_USE_WOLFSSL=OFF \
|
||||
-DCURL_USE_LIBSSH2=OFF \
|
||||
-DUSE_LIBIDN2=OFF \
|
||||
-DUSE_NGHTTP2=OFF \
|
||||
-DCURL_ENABLE_SSL=OFF \
|
||||
-DCURL_ZLIB="" \
|
||||
-DCURL_BROTLI="" \
|
||||
-DCURL_ZSTD="" \
|
||||
-DWolfSSL_ROOT='${{github.workspace}}/thirdparties/wolfssl_install'
|
||||
cmake --build ./build --config Release --parallel
|
||||
cmake --install ./build --config Release
|
||||
|
||||
###
|
||||
# Project
|
||||
###
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
path: 'source'
|
||||
|
||||
- name: CMake Settings
|
||||
run: |
|
||||
echo "CMAKE_PARAM=--log-level=VERBOSE \
|
||||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/install' \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=on \
|
||||
-DCMAKE_OSX_ARCHITECTURES='${{ matrix.architecture.build_name }}' \
|
||||
-DUSE_INTERNAL_SDL=OFF \
|
||||
-DSDL2_DIR='${{github.workspace}}/thirdparties/SDL2/install/lib/cmake/SDL2' \
|
||||
-DOPENAL_LIBRARY='${{github.workspace}}/thirdparties/soft-oal/install' \
|
||||
-DOPENAL_INCLUDE_DIR='${{github.workspace}}/thirdparties/soft-oal/install/include/AL' \
|
||||
-DCURL_ROOT='${{github.workspace}}/thirdparties/curl/install' \
|
||||
-DUSE_RENDERER_DLOPEN=OFF \
|
||||
-DBUILD_RENDERER_GL2=OFF \
|
||||
-DBUILD_MACOS_APP=OFF \
|
||||
-DGIT_REVISION_BUILD_NUMBER=${{ github.run_number }} \
|
||||
-DPRODUCT_VERSION_STAGE='${{ env.RELEASE_STAGE }}'" >> $GITHUB_ENV
|
||||
|
||||
- name: Configure CMake
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
cmake -B ./build ${{ env.CMAKE_PARAM }} ./source
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
|
||||
|
||||
- name: Install
|
||||
working-directory: ${{github.workspace}}
|
||||
# Install to the directory defined in CMAKE_INSTALL_PREFIX
|
||||
run: |
|
||||
cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
||||
# Create hard-link and copy symbolic links
|
||||
mkdir ${{github.workspace}}/package
|
||||
cp -l ${{github.workspace}}/thirdparties/SDL2/install/lib/libSDL2-2.0.0.dylib '${{github.workspace}}/package/'
|
||||
cp -l ${{github.workspace}}/thirdparties/soft-oal/install/lib/libopenal.1.dylib '${{github.workspace}}/package/'
|
||||
cp -l ${{github.workspace}}/thirdparties/curl/install/lib*/libcurl.4.dylib '${{github.workspace}}/package/'
|
||||
if [ -d ${{github.workspace}}/install/bin ]; then cp -r ${{github.workspace}}/install/bin/openmohaa/. '${{github.workspace}}/package'; fi
|
||||
if [ -d ${{github.workspace}}/install/lib ]; then cp -r ${{github.workspace}}/install/lib/openmohaa/. '${{github.workspace}}/package'; fi
|
||||
|
||||
###
|
||||
# Artifacts
|
||||
###
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: out-macos-${{matrix.architecture.name}}
|
||||
if-no-files-found: error
|
||||
compression-level: 9
|
||||
path:
|
||||
${{github.workspace}}/package
|
||||
@@ -0,0 +1,294 @@
|
||||
##########################
|
||||
#
|
||||
# Microsoft Windows
|
||||
# Windows Server 2025
|
||||
#
|
||||
##########################
|
||||
name: "Windows Builds"
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
environment:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: RelWithDebInfo
|
||||
RELEASE_STAGE: ${{ vars.RELEASE_STAGE || 'unstable' }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
architecture: [
|
||||
{name: 'x64', os: 'windows-2025', config: 'x64', toolset: 'x64', arch_option: 'VC-WIN64A' },
|
||||
{name: 'x86', os: 'windows-2025', config: 'Win32', toolset: 'x64_x86', arch_option: 'VC-WIN32' },
|
||||
{name: 'arm64', os: 'windows-11-arm', config: 'ARM64', toolset: 'x64_arm64', arch_option: 'VC-WIN64-ARM' }
|
||||
]
|
||||
|
||||
name: "Building for platform windows-${{matrix.architecture.name}}"
|
||||
runs-on: ${{ matrix.architecture.os }}
|
||||
environment: ${{ inputs.environment }}
|
||||
env:
|
||||
flexbison-branch: 'v2.5.25'
|
||||
wolfssl-version: 'v5.7.6-stable'
|
||||
curl-version: '8_12_1'
|
||||
openal-soft-branch: '1.24.3'
|
||||
sdl2-branch: 'release-2.32.8'
|
||||
|
||||
steps:
|
||||
###
|
||||
# Packages
|
||||
###
|
||||
|
||||
- name: Cache Flex/Bison
|
||||
id: cache-flexbison
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: 'thirdparties/winflexbison-install'
|
||||
key: ${{ runner.os }}-${{ matrix.architecture.name }}-flexbison-${{ env.flexbison-branch }}-v2
|
||||
|
||||
- name: Install Flex/Bison
|
||||
if: steps.cache-flexbison.outputs.cache-hit != 'true'
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
mkdir thirdparties && cd thirdparties
|
||||
git clone --depth 1 --single-branch --branch ${{ env.flexbison-branch }} https://github.com/lexxmark/winflexbison.git
|
||||
cmake -B winflexbison-build -DCMAKE_INSTALL_PREFIX='${{github.workspace}}/thirdparties/winflexbison-install' -DCMAKE_POLICY_VERSION_MINIMUM="3.5" ./winflexbison
|
||||
cmake --build winflexbison-build --config Release --parallel
|
||||
cmake --install winflexbison-build --config Release
|
||||
|
||||
- name: Settings
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
echo "CMAKE_GENERATOR=Ninja Multi-Config" >> $env:GITHUB_ENV
|
||||
echo "CC=cl.exe" >> $env:GITHUB_ENV
|
||||
echo "CXX=cl.exe" >> $env:GITHUB_ENV
|
||||
pushd "$($env:PROGRAMFILES)\Microsoft Visual Studio\*\*\VC\Auxiliary\Build"
|
||||
cmd /c "vcvarsall.bat ${{ matrix.architecture.toolset }} & set" | ForEach-Object {
|
||||
if ($_ -match "=") {
|
||||
# Split into key=value
|
||||
$var = $_.split("=", 2);
|
||||
echo "$($var[0])=$($var[1])" >> $env:GITHUB_ENV
|
||||
}
|
||||
}
|
||||
popd
|
||||
|
||||
- name: Cache Required Packages
|
||||
id: cache-required-packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: 'C:\Packages'
|
||||
key: ${{ runner.os }}-${{ matrix.architecture.name }}-required-packages-v1
|
||||
|
||||
- name: Install required packages
|
||||
if: steps.cache-required-packages.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
$DownloadPath="$($env:USERPROFILE)\Downloads"
|
||||
if ("${{ matrix.architecture.config }}" -ieq "ARM64") {
|
||||
Invoke-WebRequest "https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-winarm64.zip" -OutFile "$DownloadPath\ninja-win.zip"
|
||||
} else {
|
||||
Invoke-WebRequest "https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-win.zip" -OutFile "$DownloadPath\ninja-win.zip"
|
||||
}
|
||||
Expand-Archive -Path "$DownloadPath\ninja-win.zip" -DestinationPath "C:\Packages\ninja"
|
||||
Invoke-WebRequest "https://download.qt.io/official_releases/jom/jom.zip" -OutFile "$DownloadPath\jom.zip"
|
||||
Expand-Archive -Path "$DownloadPath\jom.zip" -DestinationPath "C:\Packages\jom"
|
||||
|
||||
- name: Setup required packages path
|
||||
run: |
|
||||
$env:PATH += ";C:\Packages\ninja;C:\Packages\jom;"
|
||||
echo "PATH=$($env:PATH)" >> $env:GITHUB_ENV
|
||||
if ("${{ matrix.architecture.config }}" -ieq "ARM64") {
|
||||
# Workaround against linking errors related to interlocked functions
|
||||
echo "CFLAGS=/forceInterlockedFunctions-" >> $env:GITHUB_ENV
|
||||
}
|
||||
|
||||
###
|
||||
# SDL
|
||||
###
|
||||
|
||||
# Cache SDL
|
||||
- name: Cache SDL2
|
||||
id: cache-sdl2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: 'thirdparties/SDL2/install'
|
||||
key: ${{ runner.os }}-${{ matrix.architecture.name }}-sdl2-${{ env.sdl2-branch }}-v1
|
||||
|
||||
# SDL2 setup
|
||||
- name: Checkout SDL2
|
||||
if: steps.cache-sdl2.outputs.cache-hit != 'true'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'libsdl-org/SDL'
|
||||
path: 'thirdparties/SDL2'
|
||||
ref: '${{ env.sdl2-branch }}'
|
||||
|
||||
- name: Configure and install SDL2
|
||||
if: steps.cache-sdl2.outputs.cache-hit != 'true'
|
||||
working-directory: ${{github.workspace}}/thirdparties/SDL2
|
||||
run: |
|
||||
cmake -B ./build `
|
||||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/thirdparties/SDL2/install'
|
||||
cmake --build ./build --config Release --parallel
|
||||
cmake --install ./build --config Release
|
||||
|
||||
###
|
||||
# OpenAL
|
||||
###
|
||||
- name: Cache OpenAL
|
||||
id: cache-openal-soft
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: 'thirdparties/soft-oal/install'
|
||||
key: ${{ runner.os }}-${{ matrix.architecture.name }}-openal-soft-${{ env.openal-soft-branch }}-v1
|
||||
|
||||
# soft-oal setup
|
||||
- name: Checkout soft-oal
|
||||
if: steps.cache-openal-soft.outputs.cache-hit != 'true'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'kcat/openal-soft'
|
||||
path: 'thirdparties/soft-oal'
|
||||
ref: '${{ env.openal-soft-branch }}'
|
||||
|
||||
# soft-oal build
|
||||
# Statically link the CRT runtime into OAL as a workaround to prevent crashes
|
||||
- name: Configure and install soft-oal
|
||||
if: steps.cache-openal-soft.outputs.cache-hit != 'true'
|
||||
working-directory: ${{github.workspace}}/thirdparties/soft-oal
|
||||
run: |
|
||||
cmake -B ./build `
|
||||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/thirdparties/soft-oal/install' `
|
||||
-DALSOFT_BUILD_ROUTER=OFF `
|
||||
-DALSOFT_REQUIRE_WINMM=ON `
|
||||
-DALSOFT_REQUIRE_DSOUND=ON `
|
||||
-DALSOFT_REQUIRE_WASAPI=ON `
|
||||
-DCMAKE_C_FLAGS_RELEASE="/MT /O2 /Ob2 /DNDEBUG" `
|
||||
-DCMAKE_CXX_FLAGS_RELEASE="/MT /O2 /Ob2 /DNDEBUG" `
|
||||
-DCMAKE_C_FLAGS_MINSIZEREL="/MT /O2 /Ob2 /DNDEBUG" `
|
||||
-DCMAKE_CXX_FLAGS_MINSIZEREL="/MT /O1 /Ob1 /DNDEBUG" `
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="/MT /Zi /O2 /Ob1 /DNDEBUG" `
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="/MT /Zi /O2 /Ob1 /DNDEBUG"
|
||||
cmake --build ./build --config Release --parallel
|
||||
cmake --install ./build --config Release
|
||||
# Unfortunately soft-oal produces a binary called OpenAL32 even in 64-bit
|
||||
if (("x64", "ARM64") -icontains "${{ matrix.architecture.config }}") { Rename-Item -Path '.\install\bin\OpenAL32.dll' -NewName 'OpenAL64.dll' }
|
||||
|
||||
###
|
||||
# cURL
|
||||
#
|
||||
# Uses Schannel as SSL backend, native CAs are used
|
||||
###
|
||||
- name: Cache cURL
|
||||
id: cache-curl
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: 'thirdparties/curl/install'
|
||||
key: ${{ runner.os }}-${{ matrix.architecture.name }}-curl-${{ env.curl-version }}-v1
|
||||
|
||||
# cURL setup
|
||||
- name: Checkout cURL
|
||||
if: steps.cache-curl.outputs.cache-hit != 'true'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'curl/curl'
|
||||
path: 'thirdparties/curl'
|
||||
ref: 'curl-${{ env.curl-version }}'
|
||||
|
||||
# cURL build
|
||||
- name: Configure and install curl
|
||||
if: steps.cache-curl.outputs.cache-hit != 'true'
|
||||
working-directory: ${{github.workspace}}/thirdparties/curl
|
||||
run: |
|
||||
cmake -B ./build `
|
||||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/thirdparties/curl/install' `
|
||||
-DCURL_USE_LIBPSL=OFF `
|
||||
-DCURL_USE_SCHANNEL=ON
|
||||
cmake --build ./build --config Release --parallel
|
||||
cmake --install ./build --config Release
|
||||
|
||||
###
|
||||
# Project
|
||||
###
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
path: 'source'
|
||||
|
||||
- name: CMake Settings
|
||||
run: |
|
||||
echo "CMAKE_PARAM= `
|
||||
--log-level=VERBOSE `
|
||||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/install' `
|
||||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=true `
|
||||
-DGIT_REVISION_BUILD_NUMBER=${{ github.run_number }} `
|
||||
-DBISON_EXECUTABLE='${{github.workspace}}/thirdparties/winflexbison-install/win_bison.exe' `
|
||||
-DUSE_INTERNAL_SDL=OFF `
|
||||
-DSDL2_DIR='${{github.workspace}}/thirdparties/SDL2/install/cmake' `
|
||||
-DOPENAL_LIBRARY='${{github.workspace}}/thirdparties/soft-oal' `
|
||||
-DOPENAL_INCLUDE_DIR='${{github.workspace}}/thirdparties/soft-oal/install/include/AL' `
|
||||
-DCURL_ROOT='${{github.workspace}}/thirdparties/curl/install' `
|
||||
-DFLEX_EXECUTABLE='${{github.workspace}}/thirdparties/winflexbison-install/win_flex.exe' `
|
||||
-DUSE_RENDERER_DLOPEN=OFF `
|
||||
-DBUILD_RENDERER_GL2=OFF `
|
||||
-DPRODUCT_VERSION_STAGE='${{ env.RELEASE_STAGE }}'".Replace("`r", "").Replace("`n", "") >> $env:GITHUB_ENV
|
||||
|
||||
- name: Configure CMake
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
cmake -B ./build ${{ env.CMAKE_PARAM }} ./source
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
|
||||
|
||||
- name: Install
|
||||
working-directory: ${{github.workspace}}
|
||||
# Install to the directory defined in CMAKE_INSTALL_PREFIX
|
||||
run: |
|
||||
cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
||||
New-Item -ItemType Directory '${{github.workspace}}/package'
|
||||
Copy-Item '${{github.workspace}}/thirdparties/SDL2/install/bin/*.dll' -Destination '${{github.workspace}}/package'
|
||||
Copy-Item '${{github.workspace}}/thirdparties/soft-oal/install/bin/*.dll' -Destination '${{github.workspace}}/package'
|
||||
Copy-Item '${{github.workspace}}/thirdparties/curl/install/bin/*.dll' -Destination '${{github.workspace}}/package'
|
||||
if (Test-Path ${{github.workspace}}/install/bin) { Copy-Item '${{github.workspace}}/install/bin/*' -Include '*.dll','*.exe','*.pdb' -Destination '${{github.workspace}}/package' }
|
||||
if (Test-Path ${{github.workspace}}/install/lib) { Copy-Item '${{github.workspace}}/install/lib/*' -Include '*.dll','*.exe','*.pdb' -Destination '${{github.workspace}}/package' }
|
||||
|
||||
- name: Generate setup files
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
Copy-Item -Path '${{github.workspace}}/package' -Destination 'source/misc/setup/windows/app/files' -Recurse
|
||||
dotnet build -p Platform=${{matrix.architecture.config}} -c Release -o out source/misc/setup/windows/app
|
||||
|
||||
###
|
||||
# Artifact
|
||||
###
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: out-windows-${{matrix.architecture.name}}
|
||||
if-no-files-found: error
|
||||
compression-level: 9
|
||||
path: |
|
||||
${{github.workspace}}/package
|
||||
!${{github.workspace}}/package/**/*.pdb
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: out-windows-${{matrix.architecture.name}}-pdb
|
||||
if-no-files-found: error
|
||||
compression-level: 9
|
||||
path: |
|
||||
${{github.workspace}}/package
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: out-windows-${{matrix.architecture.name}}-installer
|
||||
if-no-files-found: error
|
||||
path: |
|
||||
${{github.workspace}}/out/en-us/Setup.msi
|
||||
${{github.workspace}}/out/en-us/Setup.wixpdb
|
||||
@@ -7,468 +7,18 @@ on:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: RelWithDebInfo
|
||||
RELEASE_STAGE: ${{ vars.RELEASE_STAGE || 'unstable' }}
|
||||
|
||||
jobs:
|
||||
##########################
|
||||
#
|
||||
# Linux
|
||||
# Ubuntu 22.04
|
||||
#
|
||||
# Using this version instead of 24.04 to use a lower GLIBC version (2.34)
|
||||
##########################
|
||||
build-platform-linux:
|
||||
strategy:
|
||||
matrix:
|
||||
architecture: [
|
||||
{name: 'amd64', triple: 'x86_64-linux-gnu'},
|
||||
{name: 'i686', triple: 'i686-linux-gnu'},
|
||||
{name: 'arm64', triple: 'aarch64-linux-gnu'},
|
||||
{name: 'armhf', triple: 'arm-linux-gnueabihf'},
|
||||
{name: 'powerpc', triple: 'powerpc-linux-gnu'},
|
||||
{name: 'ppc64', triple: 'powerpc64-linux-gnu'},
|
||||
{name: 'ppc64el', triple: 'powerpc64le-linux-gnu'}
|
||||
]
|
||||
uses: ./.github/workflows/shared-build-linux.yml
|
||||
with:
|
||||
environment: ${{inputs.environment}}
|
||||
|
||||
name: "Building for platform linux-${{matrix.architecture.name}}"
|
||||
runs-on: "ubuntu-22.04"
|
||||
environment: ${{ inputs.environment }}
|
||||
|
||||
steps:
|
||||
###
|
||||
# Packages
|
||||
###
|
||||
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
name: Install required packages
|
||||
with:
|
||||
packages: flex bison ninja-build cmake clang libpulse-dev portaudio19-dev libasound2-dev libjack-dev libpipewire-0.3-dev qtbase5-dev libdbus-1-dev
|
||||
version: "0.1"
|
||||
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
name: Install required cross-platform packages (${{ matrix.architecture.triple }})
|
||||
if: matrix.architecture.name != 'amd64'
|
||||
with:
|
||||
packages: gcc-12-${{ matrix.architecture.triple }} g++-12-${{ matrix.architecture.triple }}
|
||||
version: "0.1"
|
||||
|
||||
- name: Settings
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
echo "CMAKE_GENERATOR=Ninja Multi-Config" >> $GITHUB_ENV
|
||||
echo "CC=clang" >> $GITHUB_ENV
|
||||
echo "CXX=clang++" >> $GITHUB_ENV
|
||||
echo "CFLAGS='--target=${{ matrix.architecture.triple }}'" >> $GITHUB_ENV
|
||||
echo "CXXFLAGS='--target=${{ matrix.architecture.triple }}'" >> $GITHUB_ENV
|
||||
|
||||
###
|
||||
# SDL
|
||||
###
|
||||
|
||||
# Setup SDL
|
||||
- name: Set up SDL
|
||||
id: sdl
|
||||
uses: libsdl-org/setup-sdl@main
|
||||
with:
|
||||
version: 2-latest
|
||||
build-type: Release
|
||||
# Workaround for when changing the runner OS version
|
||||
cmake-arguments: "-DCACHE_OS_VERSION=Ubuntu_22.04"
|
||||
|
||||
###
|
||||
# OpenAL
|
||||
###
|
||||
|
||||
# soft-oal setup
|
||||
- name: Checkout soft-oal
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'kcat/openal-soft'
|
||||
path: 'thirdparties/soft-oal'
|
||||
ref: '1.24.1'
|
||||
|
||||
- name: Configure and install soft-oal
|
||||
working-directory: ${{github.workspace}}/thirdparties/soft-oal
|
||||
run: |
|
||||
cmake -B ./build \
|
||||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/thirdparties/soft-oal/install'
|
||||
cmake --build ./build --config Release --parallel
|
||||
cmake --install ./build --config Release
|
||||
|
||||
###
|
||||
# Project
|
||||
###
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
path: 'source'
|
||||
|
||||
- name: CMake Settings
|
||||
run: |
|
||||
echo "CMAKE_PARAM=--log-level=VERBOSE \
|
||||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/install' \
|
||||
-DOPENAL_LIBRARY='${{github.workspace}}/thirdparties/soft-oal' \
|
||||
-DOPENAL_INCLUDE_DIR='${{github.workspace}}/thirdparties/soft-oal/include' \
|
||||
-DGIT_REVISION_BUILD_NUMBER=${{ github.run_number }} \
|
||||
-DPRODUCT_VERSION_STAGE='${{ env.RELEASE_STAGE }}'" >> $GITHUB_ENV
|
||||
|
||||
- name: Configure CMake
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
cmake -B ./build ${{ env.CMAKE_PARAM }} ./source
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}
|
||||
# Execute tests defined by the CMake configuration.
|
||||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||
run: |
|
||||
cd "${{github.workspace}}/build"
|
||||
ctest -C ${{env.BUILD_TYPE}}
|
||||
|
||||
- name: Install
|
||||
working-directory: ${{github.workspace}}
|
||||
# Install to the directory defined in CMAKE_INSTALL_PREFIX
|
||||
run: |
|
||||
cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
||||
# Copy libraries
|
||||
mkdir ${{github.workspace}}/package
|
||||
cp -l ${{steps.sdl.outputs.prefix}}/lib/libSDL2-2.0.so.0 '${{github.workspace}}/package/'
|
||||
cp -l ${{github.workspace}}/thirdparties/soft-oal/install/lib/libopenal.so.1 '${{github.workspace}}/package/'
|
||||
if [ -d ${{github.workspace}}/install/bin ]; then cp -r ${{github.workspace}}/install/bin/openmohaa/. '${{github.workspace}}/package'; fi
|
||||
if [ -d ${{github.workspace}}/install/lib ]; then cp -r ${{github.workspace}}/install/lib/openmohaa/. '${{github.workspace}}/package'; fi
|
||||
|
||||
###
|
||||
# Artifacts
|
||||
###
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: out-linux-${{matrix.architecture.name}}
|
||||
if-no-files-found: error
|
||||
path:
|
||||
${{github.workspace}}/package
|
||||
|
||||
##########################
|
||||
#
|
||||
# Microsoft Windows
|
||||
# Windows Server 2022
|
||||
#
|
||||
##########################
|
||||
build-platform-windows:
|
||||
strategy:
|
||||
matrix:
|
||||
architecture: [
|
||||
{name: 'x64', config: 'x64', toolset: 'x64' },
|
||||
{name: 'x86', config: 'Win32', toolset: 'x64_x86' },
|
||||
{name: 'arm64', config: 'ARM64', toolset: 'x64_arm64' }
|
||||
]
|
||||
uses: ./.github/workflows/shared-build-windows.yml
|
||||
with:
|
||||
environment: ${{inputs.environment}}
|
||||
|
||||
name: "Building for platform windows-${{matrix.architecture.name}}"
|
||||
runs-on: "windows-2022"
|
||||
environment: ${{ inputs.environment }}
|
||||
|
||||
steps:
|
||||
###
|
||||
# Packages
|
||||
###
|
||||
|
||||
#
|
||||
# Commented out for now, chocolatey servers started complaining about too many requests
|
||||
#
|
||||
#- name: Install required packages
|
||||
# run: |
|
||||
# choco install -y ninja
|
||||
|
||||
- name: Install required packages
|
||||
run: |
|
||||
$DownloadPath="$($env:USERPROFILE)\Downloads"
|
||||
Invoke-WebRequest "https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-win.zip" -OutFile "$DownloadPath\ninja-win.zip"
|
||||
Expand-Archive -Path "$DownloadPath\ninja-win.zip" -DestinationPath "$($env:PROGRAMFILES)\ninja"
|
||||
echo "$($env:PROGRAMFILES)\ninja" >> $GITHUB_PATH
|
||||
|
||||
- name: Install Flex/Bison
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
mkdir thirdparties && cd thirdparties
|
||||
git clone --depth 1 --single-branch --branch v2.5.25 https://github.com/lexxmark/winflexbison.git
|
||||
cmake -B winflexbison-build -DCMAKE_INSTALL_PREFIX='${{github.workspace}}/thirdparties/winflexbison-install' ./winflexbison
|
||||
cmake --build winflexbison-build --config Release --parallel
|
||||
cmake --install winflexbison-build --config Release
|
||||
|
||||
- name: Settings
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
echo "CMAKE_GENERATOR=Ninja Multi-Config" >> $env:GITHUB_ENV
|
||||
echo "CC=cl.exe" >> $env:GITHUB_ENV
|
||||
echo "CXX=cl.exe" >> $env:GITHUB_ENV
|
||||
pushd "$($env:PROGRAMFILES)\Microsoft Visual Studio\*\*\VC\Auxiliary\Build"
|
||||
cmd /c "vcvarsall.bat ${{ matrix.architecture.toolset }} & set" | ForEach-Object {
|
||||
if ($_ -match "=") {
|
||||
# Split into key=value
|
||||
$var = $_.split("=", 2);
|
||||
echo "$($var[0])=$($var[1])" >> $env:GITHUB_ENV
|
||||
}
|
||||
}
|
||||
popd
|
||||
|
||||
###
|
||||
# SDL
|
||||
###
|
||||
|
||||
# Setup SDL
|
||||
- name: Set up SDL
|
||||
id: sdl
|
||||
uses: libsdl-org/setup-sdl@main
|
||||
with:
|
||||
version: 2-latest
|
||||
build-type: Release
|
||||
cmake-arguments: ""
|
||||
|
||||
###
|
||||
# OpenAL
|
||||
###
|
||||
|
||||
# soft-oal setup
|
||||
- name: Checkout soft-oal
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'kcat/openal-soft'
|
||||
path: 'thirdparties/soft-oal'
|
||||
ref: '1.24.1'
|
||||
|
||||
# soft-oal build
|
||||
# Statically link the CRT runtime into OAL as a workaround to prevent crashes
|
||||
- name: Configure and install soft-oal
|
||||
working-directory: ${{github.workspace}}/thirdparties/soft-oal
|
||||
run: |
|
||||
cmake -B ./build `
|
||||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/thirdparties/soft-oal/install' `
|
||||
-DALSOFT_BUILD_ROUTER=OFF `
|
||||
-DALSOFT_REQUIRE_WINMM=ON `
|
||||
-DALSOFT_REQUIRE_DSOUND=ON `
|
||||
-DALSOFT_REQUIRE_WASAPI=ON `
|
||||
-DCMAKE_C_FLAGS_RELEASE="/MT /O2 /Ob2 /DNDEBUG" `
|
||||
-DCMAKE_CXX_FLAGS_RELEASE="/MT /O2 /Ob2 /DNDEBUG" `
|
||||
-DCMAKE_C_FLAGS_MINSIZEREL="/MT /O2 /Ob2 /DNDEBUG" `
|
||||
-DCMAKE_CXX_FLAGS_MINSIZEREL="/MT /O1 /Ob1 /DNDEBUG" `
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="/MT /Zi /O2 /Ob1 /DNDEBUG" `
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="/MT /Zi /O2 /Ob1 /DNDEBUG"
|
||||
cmake --build ./build --config Release --parallel
|
||||
cmake --install ./build --config Release
|
||||
# Unfortunately soft-oal produces a binary called OpenAL32 even in 64-bit
|
||||
if (("x64", "ARM64") -icontains "${{ matrix.architecture.config }}") { Rename-Item -Path '.\install\bin\OpenAL32.dll' -NewName 'OpenAL64.dll' }
|
||||
|
||||
###
|
||||
# Project
|
||||
###
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
path: 'source'
|
||||
|
||||
- name: CMake Settings
|
||||
run: |
|
||||
echo "CMAKE_PARAM= `
|
||||
--log-level=VERBOSE `
|
||||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/install' `
|
||||
-DGIT_REVISION_BUILD_NUMBER=${{ github.run_number }} `
|
||||
-DBISON_EXECUTABLE='${{github.workspace}}/thirdparties/winflexbison-install/win_bison.exe' `
|
||||
-DOPENAL_LIBRARY='${{github.workspace}}/thirdparties/soft-oal' `
|
||||
-DOPENAL_INCLUDE_DIR='${{github.workspace}}/thirdparties/soft-oal/include' `
|
||||
-DFLEX_EXECUTABLE='${{github.workspace}}/thirdparties/winflexbison-install/win_flex.exe' `
|
||||
-DPRODUCT_VERSION_STAGE='${{ env.RELEASE_STAGE }}'".Replace("`r", "").Replace("`n", "") >> $env:GITHUB_ENV
|
||||
|
||||
- name: Configure CMake
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
cmake -B ./build ${{ env.CMAKE_PARAM }} ./source
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}
|
||||
# Execute tests defined by the CMake configuration.
|
||||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||
run: |
|
||||
cd "${{github.workspace}}/build"
|
||||
ctest -C ${{env.BUILD_TYPE}}
|
||||
|
||||
- name: Install
|
||||
working-directory: ${{github.workspace}}
|
||||
# Install to the directory defined in CMAKE_INSTALL_PREFIX
|
||||
run: |
|
||||
cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
||||
New-Item -ItemType Directory '${{github.workspace}}/package'
|
||||
Copy-Item '${{steps.sdl.outputs.prefix}}/bin/*.dll' -Destination '${{github.workspace}}/package'
|
||||
Copy-Item '${{github.workspace}}/thirdparties/soft-oal/install/bin/*.dll' -Destination '${{github.workspace}}/package'
|
||||
if (Test-Path ${{github.workspace}}/install/bin) { Copy-Item '${{github.workspace}}/install/bin/*' -Include '*.dll','*.exe','*.pdb' -Destination '${{github.workspace}}/package' }
|
||||
if (Test-Path ${{github.workspace}}/install/lib) { Copy-Item '${{github.workspace}}/install/lib/*' -Include '*.dll','*.exe','*.pdb' -Destination '${{github.workspace}}/package' }
|
||||
|
||||
###
|
||||
# Artifact
|
||||
###
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: out-windows-${{matrix.architecture.name}}
|
||||
if-no-files-found: error
|
||||
path: |
|
||||
${{github.workspace}}/package
|
||||
!${{github.workspace}}/package/**/*.pdb
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: out-windows-${{matrix.architecture.name}}-pdb
|
||||
if-no-files-found: error
|
||||
path: |
|
||||
${{github.workspace}}/package
|
||||
|
||||
##########################
|
||||
#
|
||||
# Apple macOS
|
||||
# macOS 14
|
||||
#
|
||||
# This version is used as the OS, as older versions are slower.
|
||||
##########################
|
||||
build-platform-macos:
|
||||
strategy:
|
||||
matrix:
|
||||
architecture: [
|
||||
#{name: 'x86_64', triple: 'x86_64-apple-macos10.8'},
|
||||
#{name: 'arm64', triple: 'arm64-apple-macos11'}
|
||||
#{name: 'x86_64', build_name: 'x86_64'},
|
||||
#{name: 'arm64', build_name: 'arm64'},
|
||||
# Compile into an universal binary
|
||||
{name: 'multiarch(arm64-x86_64)', build_name: 'arm64;x86_64' }
|
||||
]
|
||||
|
||||
name: "Building for platform macos-${{matrix.architecture.name}}"
|
||||
runs-on: "macos-15"
|
||||
environment: ${{inputs.environment}}
|
||||
|
||||
steps:
|
||||
###
|
||||
# Packages
|
||||
###
|
||||
|
||||
# Install required packages
|
||||
# Paths on x86_64 and ARM64 are different for homebrew
|
||||
- name: Install required packages
|
||||
run: |
|
||||
brew update && brew install git flex bison ninja cmake llvm ninja
|
||||
|
||||
- name: Settings
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
echo "CMAKE_GENERATOR=Ninja Multi-Config" >> $GITHUB_ENV
|
||||
echo "CC=clang" >> $GITHUB_ENV
|
||||
echo "CXX=clang++" >> $GITHUB_ENV
|
||||
echo "MACOSX_DEPLOYMENT_TARGET=10.15" >> $GITHUB_ENV
|
||||
|
||||
###
|
||||
# SDL
|
||||
###
|
||||
|
||||
# Setup SDL
|
||||
- name: Set up SDL
|
||||
id: sdl
|
||||
uses: libsdl-org/setup-sdl@main
|
||||
with:
|
||||
version: 2-latest
|
||||
build-type: Release
|
||||
cmake-arguments: "-DCMAKE_OSX_ARCHITECTURES='${{ matrix.architecture.build_name }}'
|
||||
-DCMAKE_VERBOSE_MAKEFILE=on"
|
||||
###
|
||||
# OpenAL
|
||||
###
|
||||
|
||||
# soft-oal setup
|
||||
# Use GCC instead of Clang because of missing SSE intrinsics
|
||||
# It also doesn't enable altivec support on PowerPC by default
|
||||
- name: Checkout soft-oal
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'kcat/openal-soft'
|
||||
path: 'thirdparties/soft-oal'
|
||||
ref: '1.24.1'
|
||||
|
||||
- name: Configure and install soft-oal
|
||||
working-directory: ${{github.workspace}}/thirdparties/soft-oal
|
||||
run: |
|
||||
cmake -B ./build \
|
||||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/thirdparties/soft-oal/install' \
|
||||
-DCMAKE_OSX_ARCHITECTURES='${{ matrix.architecture.build_name }}' \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=on
|
||||
cmake --build ./build --config Release --parallel
|
||||
cmake --install ./build --config Release
|
||||
|
||||
###
|
||||
# Project
|
||||
###
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
path: 'source'
|
||||
|
||||
- name: CMake Settings
|
||||
run: |
|
||||
echo "CMAKE_PARAM=--log-level=VERBOSE \
|
||||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/install' \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=on \
|
||||
-DCMAKE_OSX_ARCHITECTURES='${{ matrix.architecture.build_name }}' \
|
||||
-DOPENAL_LIBRARY='${{github.workspace}}/thirdparties/soft-oal/install' \
|
||||
-DOPENAL_INCLUDE_DIR='${{github.workspace}}/thirdparties/soft-oal/install/include/AL' \
|
||||
-DGIT_REVISION_BUILD_NUMBER=${{ github.run_number }} \
|
||||
-DPRODUCT_VERSION_STAGE='${{ env.RELEASE_STAGE }}'" >> $GITHUB_ENV
|
||||
|
||||
- name: Configure CMake
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
cmake -B ./build ${{ env.CMAKE_PARAM }} ./source
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}
|
||||
# Execute tests defined by the CMake configuration.
|
||||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||
run: |
|
||||
cd "${{github.workspace}}/build"
|
||||
ctest -C ${{env.BUILD_TYPE}}
|
||||
|
||||
- name: Install
|
||||
working-directory: ${{github.workspace}}
|
||||
# Install to the directory defined in CMAKE_INSTALL_PREFIX
|
||||
run: |
|
||||
cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
||||
# Create hard-link and copy symbolic links
|
||||
mkdir ${{github.workspace}}/package
|
||||
cp -l ${{steps.sdl.outputs.prefix}}/lib/libSDL2-2.0.0.dylib '${{github.workspace}}/package/'
|
||||
cp -l ${{github.workspace}}/thirdparties/soft-oal/install/lib/libopenal.1.dylib '${{github.workspace}}/package/'
|
||||
if [ -d ${{github.workspace}}/install/bin ]; then cp -r ${{github.workspace}}/install/bin/openmohaa/. '${{github.workspace}}/package'; fi
|
||||
if [ -d ${{github.workspace}}/install/lib ]; then cp -r ${{github.workspace}}/install/lib/openmohaa/. '${{github.workspace}}/package'; fi
|
||||
|
||||
###
|
||||
# Artifacts
|
||||
###
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: out-macos-${{matrix.architecture.name}}
|
||||
if-no-files-found: error
|
||||
path:
|
||||
${{github.workspace}}/package
|
||||
uses: ./.github/workflows/shared-build-macos.yml
|
||||
with:
|
||||
environment: ${{inputs.environment}}
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Publish artifacts
|
||||
name: "Publish Release"
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -18,11 +18,22 @@ jobs:
|
||||
with:
|
||||
environment: "release"
|
||||
|
||||
deploy_all:
|
||||
# Initially create a release with 1 job
|
||||
# so multiple files can be uploaded at the same time afterwards
|
||||
create-release:
|
||||
runs-on: ubuntu-24.04
|
||||
environment: 'release'
|
||||
needs: [build-all]
|
||||
|
||||
steps:
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2.3.2
|
||||
with:
|
||||
name: '${{github.ref_name}}-${{env.RELEASE_STAGE}}'
|
||||
prerelease: ${{env.RELEASE_IS_PRERELEASE}}
|
||||
|
||||
deploy-all:
|
||||
strategy:
|
||||
# Set the maximum number of parallel jobs to 1, to avoid a race-condition
|
||||
# while creating a new release
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
target_os: [
|
||||
'linux-amd64',
|
||||
@@ -40,12 +51,12 @@ jobs:
|
||||
'windows-arm64-pdb',
|
||||
#'macos-x86_64',
|
||||
#'macos-arm64',
|
||||
'macos-multiarch(arm64-x86_64)',
|
||||
'macos-multiarch-arm64-x86_64',
|
||||
]
|
||||
|
||||
runs-on: ubuntu-24.04
|
||||
environment: "release"
|
||||
needs: [build-all]
|
||||
environment: 'release'
|
||||
needs: [create-release]
|
||||
|
||||
env:
|
||||
RELEASE_NAME: ${{ github.event.repository.name }}-${{github.ref_name}}-${{matrix.target_os}}
|
||||
@@ -58,11 +69,41 @@ jobs:
|
||||
|
||||
- name: Zip
|
||||
working-directory: '${{github.workspace}}/${{matrix.target_os}}'
|
||||
run: zip -r "../${{ env.RELEASE_NAME }}.zip" ./
|
||||
run: zip -9 -r "../${{ env.RELEASE_NAME }}.zip" ./
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
uses: softprops/action-gh-release@v2.3.2
|
||||
with:
|
||||
name: '${{github.ref_name}}-${{env.RELEASE_STAGE}}'
|
||||
prerelease: ${{env.RELEASE_IS_PRERELEASE}}
|
||||
files: ${{github.workspace}}/${{ env.RELEASE_NAME }}.zip
|
||||
|
||||
deploy_installer_windows:
|
||||
strategy:
|
||||
matrix:
|
||||
target_os: [
|
||||
'windows-x64',
|
||||
'windows-x86',
|
||||
'windows-arm64',
|
||||
]
|
||||
|
||||
runs-on: ubuntu-24.04
|
||||
environment: "release"
|
||||
needs: [create-release]
|
||||
|
||||
env:
|
||||
RELEASE_NAME: ${{ github.event.repository.name }}-${{github.ref_name}}-${{matrix.target_os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: 'out-${{matrix.target_os}}-installer'
|
||||
path: ${{github.workspace}}/${{matrix.target_os}}
|
||||
|
||||
- name: Setup
|
||||
working-directory: '${{github.workspace}}/${{matrix.target_os}}'
|
||||
run:
|
||||
cp Setup.msi ../${{ env.RELEASE_NAME }}.msi
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2.3.2
|
||||
with:
|
||||
files: ${{github.workspace}}/${{ env.RELEASE_NAME }}.msi
|
||||
@@ -0,0 +1,55 @@
|
||||
name: "Unit Tests"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: "Running unit tests"
|
||||
runs-on: ubuntu-latest
|
||||
environment: "testing"
|
||||
|
||||
steps:
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
name: Install required packages
|
||||
with:
|
||||
packages: flex bison ninja-build cmake clang libsdl2-dev libopenal-dev
|
||||
version: "${{ runner.os }}-${{ runner.arch }}-unittest-v1"
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
path: 'source'
|
||||
|
||||
- name: Settings
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
echo "CMAKE_GENERATOR=Ninja Multi-Config" >> $GITHUB_ENV
|
||||
echo "CC=clang" >> $GITHUB_ENV
|
||||
echo "CXX=clang++" >> $GITHUB_ENV
|
||||
echo "CMAKE_PARAM=--log-level=VERBOSE \
|
||||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/install'" \
|
||||
-DUSE_RENDERER_DLOPEN=OFF \
|
||||
-DBUILD_RENDERER_GL2=OFF >> $GITHUB_ENV
|
||||
|
||||
- name: Configure CMake
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
cmake -B ./build ${{ env.CMAKE_PARAM }} ./source
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
cmake --build ${{github.workspace}}/build --config Debug --parallel
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
cd "${{github.workspace}}/build"
|
||||
ctest -C Debug --output-on-failure
|
||||
+7
-9
@@ -1,7 +1,4 @@
|
||||
build
|
||||
mohaa-re
|
||||
out
|
||||
Makefile.local
|
||||
build*
|
||||
*.swp
|
||||
*tags
|
||||
*~
|
||||
@@ -17,7 +14,6 @@ Makefile.local
|
||||
.DS_Store
|
||||
.LSOverride
|
||||
Icon?
|
||||
make-macosx-values.local
|
||||
|
||||
# Xcode
|
||||
####################
|
||||
@@ -44,8 +40,10 @@ profile
|
||||
*.sdf
|
||||
*.opensdf
|
||||
*.suo
|
||||
/.vs
|
||||
|
||||
.vs
|
||||
code_unfinished/*
|
||||
thirdparties/
|
||||
code/parser/generated/*
|
||||
out
|
||||
|
||||
# Flex and Bison
|
||||
####################
|
||||
/code/parser/generated
|
||||
+929
@@ -0,0 +1,929 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
#### Server
|
||||
|
||||
- Feature to name bots (most requested bot feature). See the [bot documentation](https://github.com/openmoh/openmohaa/blob/main/docs/markdown/03-configuration/01-configuration.md#bots). This may change in the future.
|
||||
- More settings for bots. See the [documentation](https://github.com/openmoh/openmohaa/blob/main/docs/markdown/03-configuration/03-configuration-bots.md) for settings.
|
||||
- Reason will be sent to clients getting kicked automatically by the game for teamkill or inactivity.
|
||||
- Reflective team damage feature. See the [documentation](https://github.com/openmoh/openmohaa/blob/main/docs/markdown/03-configuration/02-configuration-server.md#g_teamdamage) for settings and explanations.
|
||||
- Store the map file name in the `mapfilename` variable.
|
||||
|
||||
##### Scripting
|
||||
|
||||
- Add a third optional parameter for `removeclass` to specify if it should include subclasses (defaults to true).
|
||||
- The owner of a projectile is now accessible from scripts.
|
||||
|
||||
#### General
|
||||
|
||||
- Add the bot count (if there are any) in the server browser. This will only work for servers running at least the version **0.83.0** of OpenMoHAA. The bot count will also show on the [333networks](https://master.333networks.com/) master server website.
|
||||
|
||||
#### Client
|
||||
|
||||
- Add support for one-shot animated shaders in the UI (#838) (not supported in the original game).
|
||||
|
||||
#### Platform
|
||||
|
||||
- Allow separation of config, data, and state directories within the home path (XDG directory support) (#588).
|
||||
|
||||
### Changed
|
||||
|
||||
- Older saves are incompatible due to changes from commit 5df5735965298b26b9bd4b90034843c743ff7158.
|
||||
|
||||
#### Server
|
||||
|
||||
- Prevent dropping the binoculars (this change was introduced in Spearhead v2.11).
|
||||
- Servers now read and write into a configuration file `omconfig_server.cfg`, separate from the client configuration for convenience.
|
||||
|
||||
### Fixed
|
||||
|
||||
#### General
|
||||
|
||||
- Fix network profiling connectionless packet improperly counted.
|
||||
- Fix Spearhead getting medals from Allied Assault when the config file doesn't exist (also occurs in the original game) (#818).
|
||||
|
||||
#### Server
|
||||
|
||||
- Allow `g_teamkillkick` to be set to 0. Players would get kicked when this variable was set to 0 (also occurs in the original game).
|
||||
- Allow spectators and dead players to vote (#843).
|
||||
- Fix a bug where players who switched to spectator mode immediately after dying would have 0 health and drop DM items (also occurs in the original game).
|
||||
- Fix a crash that occurs when the server receives a gamespy cdkey authorize request.
|
||||
- Fix a crash that could occur when starting a `jvbot` game.
|
||||
- Fix a possible crash caused by scripts using `angles_pointat` (also occurs in the original game).
|
||||
- Fix a rare glitch causing the player to be teleported to (0,0,0) and stuck (also occurs in the original game).
|
||||
- Fix Actors not doing anything without client #0 (also occurs in the original game).
|
||||
- Fix Actors squad formation.
|
||||
- Fix an issue where clients could crash because of too many models being loaded from the server.
|
||||
- Fix bad animation blending with portable turret.
|
||||
- Fix bots being counted for voting.
|
||||
- Fix death animation movement for bots.
|
||||
- Fix holstered weapon attachment position (#847).
|
||||
- Fix improper weapon falling rotation.
|
||||
- Fix mismatched animation issues between the original clients and the server (#842).
|
||||
- Fix players not having binoculars on Allied Assault.
|
||||
- Fix players temporarily losing user input control on ARM-based OpenMoHAA servers when a message contained a special ASCII character.
|
||||
- Fix some death animations flickering for original clients playing on an OpenMoHAA servers (#857).
|
||||
- Fix some RCON programs not working with `dumpuser`.
|
||||
- Fix the carryable turret disappearing when being dropped (#812).
|
||||
- Fix the round limit being always `15` on Tug-of-War.
|
||||
- Fix votes being messed up after calling a vote the second time during the match.
|
||||
- Fix `wait` command not working on dedicated server binaries. Further commands would not be able to be executed (also occurs in the original game).
|
||||
- Fix weapon select mod not working (#849).
|
||||
- Fix wrong portable turret placement.
|
||||
- Large vote configurations will no longer cause clients to disconnect (also occurs in the original game) (#858).
|
||||
- The gamespy port `net_gamespy_port` now reflects the real port being used by the server (the issue also occurs in the original game).
|
||||
- The player would spawn with no weapons on single-player when `sv_maxbots` was set (#783).
|
||||
|
||||
#### Clients
|
||||
|
||||
- Fix a crash caused when firing bullets to specific entities with no surface type (#831).
|
||||
- Fix entities not being able to emit a light when attached to another entity (also occurs on the original Allied Assault but was fixed since Spearhead 2.0) (#824).
|
||||
- Fix mapinfo (.min) files never being saved, resulting in the loading bar never showing on some maps (#832).
|
||||
- Fix not being able to view sniper zoom when spectating.
|
||||
- Fix sky being partially culled out on some single-player maps (#817).
|
||||
- Fix the issue where the network would no longer work after hosting a multiplayer game on Allied Assault using the client.
|
||||
- Fix wrong alignment for UI elements using `centery` (#848).
|
||||
|
||||
### Changed
|
||||
|
||||
#### Server
|
||||
|
||||
- Free-For-All is now the default gametype on dedicated servers (`g_gametype 1`) when unspecified, rather than single-player (the issue also occurs in the original game).
|
||||
- Freezeplayer now freezes player animation/state, because frozen players would still emit footsteps sound when frozen.
|
||||
- Nocliping when dead no longer makes the player animation sketchy.
|
||||
|
||||
#### Clients
|
||||
|
||||
- Slightly increase the brightness of red/green chat messages.
|
||||
|
||||
#### Misc
|
||||
|
||||
- Completely refactor CMake build system (from [ioquake3's](<https://github.com/ioquake/ioq3>) new CMake build system).
|
||||
|
||||
## [0.82.1] - 2025-08-05
|
||||
|
||||
### Fixed
|
||||
|
||||
#### Crashes
|
||||
|
||||
- Fix a crash that would occur when loading custom maps in some map packs (due to a UI incorrectly declaring a widget: loadingbar, twice) (#764)
|
||||
- Fix an issue where the server could crash MOHAA base (1.11) clients in certain situations (#778)
|
||||
- The game no longer terminate with error `FS_ReadFile with empty name`. (#772)
|
||||
|
||||
#### Drawing & rendering
|
||||
|
||||
- Fix force model always using an allied skin for dead bodies.
|
||||
- Fix HUD being shown during briefings (#767)
|
||||
- Fix in-game mouse cursor disappearing on some platforms (#765)
|
||||
- Set a more distant fog for d-day by default (`set g_ddayfog 0`). This fixes an issue with sky artifacts in m3l1a. (#770)
|
||||
|
||||
#### Multiplayer
|
||||
|
||||
- Fix frequent telefrags on servers with a lot of players, like 25 players.
|
||||
- Fix taunts being played as team rather than global (#775)
|
||||
|
||||
#### Miscellaneous
|
||||
|
||||
- Update third-party libraries like jpeg and zlib.
|
||||
|
||||
## [0.82.0] - 2025-08-05
|
||||
|
||||
### Added
|
||||
|
||||
#### General
|
||||
|
||||
- Commands `add`, `subtract`, `scale`, `append` and `bitset`. `bitset`, which comes from mohaab, is particulary useful to set flags for flag-based variables like `dmflags`.
|
||||
- Logfile timestamping. It's enabled by default with the `com_logfile_timestamps` cvar. The current time is displayed at the beginning of each log entry.
|
||||
- Setup files (.msi packages) are now distributed for Windows.
|
||||
- Update check. The game will verify the latest version in the background (by querying the latest GitHub release of the repository) and print a
|
||||
- Add the **Instant Action** feature from Breakthrough. This feature, although only usable through the Breakthrough UI, allows anyone to quickly find and join popular low-ping multiplayer servers.
|
||||
|
||||
#### Multiplayer
|
||||
|
||||
- Add `(all)` prefix in text message when a player is talking to all
|
||||
- A message will be printed into console/log when a client changes their name.
|
||||
- In Spearhead and Breakthrough, axis players can now select the kar98 sniper by choosing a german panzer skin (this was one of the feature of Daven's patch).
|
||||
- The client number and their IP address will be printed next to each action (text message, joined the game...)
|
||||
|
||||
##### Bots
|
||||
|
||||
- [Recast Navigation](https://recastnav.com/) is now used by default to generate the navigation for bots. It's all automatic and works out of the box for any level, there is no need for `mp-navigation.pk3`. It provides a better and more accurate ways for bots to navigate through the maps.
|
||||
- Bots can now take path that requires jumping, falling or climbing ladders.
|
||||
- Bots will now try to get around small obstacles in front of them.
|
||||
|
||||
*Note: bigger obstacles are minimally supported, but may cause some issues in some area, like the West axis spawn in Omaha Beach.*
|
||||
|
||||
It takes less than 2 seconds to generate the navigation mesh on large maps like Berlin and Druckkammern.
|
||||
|
||||
If you have issues, executing `set g_navigation_legacy 1` command and then reloading the map will fallback to the basic pathnode-based navigation system.
|
||||
|
||||
### Fixed
|
||||
|
||||
#### Audio
|
||||
|
||||
- Updated OpenAL to version 1.24.3
|
||||
- The sound quality has improved a little bit, the new version of OpenAL uses another sound resampler by default.
|
||||
- Fix enhanced audio spatialization being forcefully enabled when it shouldn't for audio devices detected as headphones that aren't headphones.
|
||||
|
||||
#### General
|
||||
|
||||
- Fix `LOCALIZATION ERROR` spam.
|
||||
- Fix an infinite loop that would occur during name sanitization.
|
||||
- Fix a crash that would occur when using special menus (like admin menus).
|
||||
- Fix memory leaks after the process has been running for a long time.
|
||||
- Fix player name being cutoff at the first negative character
|
||||
- Fix player being able to shoot bullets from under the LOD terrain (also occurs on the original game)
|
||||
- Fix the `version` string, ensuring most software such as HLSW and mods work as intended depending on the target game version.
|
||||
|
||||
#### Client
|
||||
|
||||
- Fix bullet impacts having multiple effects sometimes.
|
||||
- Fix cinematic not stopping on map change.
|
||||
- Fix delayed SFX (such as smoke sound) being played on unrelated entities
|
||||
- Fix `Illegible server message` error when firing some type of bullets on Spearhead and Breakthrough.
|
||||
- Fix lean angle slightly not matching the original game.
|
||||
- Fix localization issues.
|
||||
- Fix Waffen skins not being usable on servers
|
||||
- Player models (selected skins) will be reset to their default value in-game if it doesn't exist, and force models will not work if the model doesn't exist on the server.
|
||||
- Reallow client `name` to be changed by the server. Names are often changed by administrators to fix duplicate names.
|
||||
|
||||
#### Multiplayer
|
||||
|
||||
- Correctly print the text of instant messages in the console/logfile.
|
||||
- Fix AllocEdict when some Breakthrough maps are started in multiplayer mode (for co-op).
|
||||
- Fix a crash related to spawnpoints.
|
||||
- Fix a crash that would occur when playing a sound with subtitle without player #0.
|
||||
- Fix a crash that occured when a player reconnects to the same slot (after timing out) and then displays the scoreboard
|
||||
- Fix an issue preventing spawning next to spawn points with an offset. This lead to frequent telefrags with lot of players.
|
||||
- Fix a crash that would occur when the player sets a first-person model as a skin, causing an infinite state loop (also occurs in the original game).
|
||||
- Fix clients joining during intermission and having a corrupt `Time` value in the scoreboard (also occurs in the original game).
|
||||
- Fix fog sometimes not updating on maps such as Gewitter.
|
||||
- Fix incorrect number of wins shown for allies and axis in the scoreboard.
|
||||
- Fix spawnpoints metrics.
|
||||
- Fix missing player starts on some maps.
|
||||
- Fix players temporarily having the name of another player when rejoining after losing connection (also occurs in original game)
|
||||
- Fix projectiles with no owner getting removed when a player joins a team (also occurs in Spearhead and Breakthrough)
|
||||
- Fix score not being able to have negative values in the result returned by the `status` server command.
|
||||
- Fix scores being incorrectly sorted in round-based matches (they must be sorted by total kills).
|
||||
- Fix some issues with laser mods, like the `Freeze-Tag` mode where the laser would not trace from the player sight.
|
||||
- Fix `sv_precache` being ignored.
|
||||
- Fix the issue where the text message gets empty when exceeding character limit.
|
||||
- Fix the round ending incorrectly in mods like beach soccer.
|
||||
- Fix weapon being dropped sometimes when switching weapons too fast (also occurs in original game)
|
||||
- Increase text message character limit to 400 characters (taking the name of the player into account).
|
||||
|
||||
#### Game module
|
||||
|
||||
- Bazooka was never showing as the preferred weapon in singleplayer.
|
||||
- Fix AI not shooting when squadmates are next to eachother in Spearhead and Breakthrough (also occurs in original game).
|
||||
- Fix AI not moving to specific location when ordered.
|
||||
- Fix AI misbehaving when curious.
|
||||
- Fix AI moving too fast on Allied Assault.
|
||||
- Fix AI having a notepad.
|
||||
- Fix ammo type not properly localized.
|
||||
- Fix an infinite loop that would occur on some maps when a vehicle start driving to a path.
|
||||
- Fix an issue where legs animations (like idle pistol stand) would not loop.
|
||||
- Fix an undefined behavior issue in some mods that could lead to infinite loop, like, `while (self.variable)` (where `self` is `NULL`).
|
||||
- Fix a crash (MAX_GAMESTATE_CHARS) and a memory leak in long matches after many models are loaded. This would occur mostly in ToW maps during long matches, or in maps spawning many `Actor`.
|
||||
- Fix a crash related to VehicleTurretGun having no vehicle owner (also occurs in original mohaab).
|
||||
- Fix a crash that would occur when a turret shoots projectiles.
|
||||
- Fix a crash when a player quits the server while in a vehicle (also occurs in original game).
|
||||
- Fix damage blend not working in Spearhead and Breakthrough.
|
||||
- Fix leaning not making a difference when trying to use.
|
||||
- Fix mods like Elgbot server-side not working properly.
|
||||
- Fix inconsistent cross-blending of torso animations.
|
||||
- Fix "silent walk", where rapidly switching weapons would prevent emitting footstep sounds (also occurs in original game).
|
||||
- Fix weapon banning not working properly when banning rifles.
|
||||
|
||||
#### Rendering
|
||||
|
||||
- Fix a crash that would occur when there are insufficient triangles for LOD terrain tessellation (also occurs in original game).
|
||||
- Fix a possible crash when loading a map with lightmaps and then loading a map that has no lightmaps.
|
||||
- Fix a rare crash that would occur when toggling the scoreboard (also occurs in original game, but was fixed in Breakthrough 2.30).
|
||||
- Fix blurry text.
|
||||
- Fix disconnected water lakes
|
||||
- Fix console prompt being hidden when there are too many characters
|
||||
- Fix line breaks occurring mid-word
|
||||
- Fix long messages being cut off in the console
|
||||
- Fix omaha beach shorelines being incorrectly rendered
|
||||
- Fix the server list being requested twice on Allied Assault when browsing internet servers.
|
||||
|
||||
#### Server
|
||||
|
||||
- Fix `CM_AdjustAreaPortalState` error
|
||||
- Fix clients rejected for too low/high ping not being able to reconnect again.
|
||||
- Fix some programs (like gamedig) not being able to retrieve gamespy data from the server.
|
||||
- Fix some programs not being able to retrieve the complete list of players
|
||||
- Fix `SV_FindIndex: overflow` errors that would occur more often than the original game during long matches.
|
||||
- Fix server crashing all clients under rare occasions.
|
||||
|
||||
### Changed
|
||||
|
||||
- Removed the architecture suffix from executables. They're now simply named `openmohaa` and `omohaaded`, for multiple reasons:
|
||||
- Avoids conflicts with shipped third-party DLLs (like SDL, OpenAL) which have no suffix.
|
||||
- Easier to build an installer and document.
|
||||
- Makes launchers and automation scripts simpler (universal name for executable files).
|
||||
- The architecture is already indicated in the archive name, on startup and in the `version` variable.*
|
||||
|
||||
- Older saves are incompatible due to changes from commit 4e8ddf3c358baef7cbfe2c8ff66c2426338cd2c7.
|
||||
|
||||
#### Client
|
||||
|
||||
- A random number is now added for the default name, like `UnnamedSoldier#1234`, or `*** Blank Name #1234 ***`.
|
||||
|
||||
#### Multiplayer
|
||||
|
||||
- All player models inside the `models/player/` folder will be cached in multiplayer. This avoids short lags/hitches when a player spawns with an un-cached model.
|
||||
|
||||
##### Master server
|
||||
|
||||
- Updated the master server to use [333networks](https://333networks.com/).
|
||||
- Add support for multiple master servers. The server browser queries them all at once, and servers send updates to each. They are powered by the **333networks** community, managed independently. Even if one master goes down, others are used, ensuring constant availability of multiplayer.
|
||||
- Iccups will occur less when fetching the server list if the network is really slow, or if the master server is unreachable.
|
||||
|
||||
#### Rendering
|
||||
|
||||
- On windowed mode, the hardware cursor is now used to navigate in the UI. This quickly allow users to get out of the window when bringing the console or the main menu up, instead of doing ALT+TAB.
|
||||
|
||||
#### Server
|
||||
|
||||
- The server is now showing the project version number in the server list.
|
||||
|
||||
## [0.81.1] - 2025-01-04
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix the text of pulldown elements being invisible on some menus
|
||||
- Fix the server not taking the client rate into account and transmitting network fragments too fast, this may be the reason why some clients were unable to connect
|
||||
|
||||
## [0.81.0] - 2025-01-02
|
||||
|
||||
### Added
|
||||
|
||||
#### Audio
|
||||
|
||||
- Add support for IMA-ADPCM Wave sound files (4-bit compressed sound). Sounds such as sea waves (in the d-day landing mission) and subpen are now played accordingly
|
||||
|
||||
#### Client
|
||||
|
||||
- Add support for smaller lightmaps (BSP files having `_sml` suffix). Smaller lightmaps are enabled at startup when the texture detail is set to `Low` and if the map supports it (single-player levels of Spearhead and Breakthrough), useful for old low-end hardware.
|
||||
- Add a new variable to customize the FOV client-side `cg_fov` (defaults to 80), the FOV is no longer an ephemeral server-side setting.
|
||||
- The FOV is automatically adjusted depending on the aspect ratio
|
||||
|
||||
#### UI
|
||||
|
||||
- Automatically scale UI and HUD for resolutions above 1920x1080 (support for 2K and above). UI and HUD elements no longer look tiny on 4K resolutions
|
||||
|
||||
### Fixed
|
||||
|
||||
- The OpenAL library has been updated to version [1.24.1](https://github.com/kcat/openal-soft/releases/tag/1.24.1).
|
||||
|
||||
#### Client
|
||||
|
||||
- Fix the client getting stuck in the loading screen when disconnected due to an error
|
||||
- Fix the client loading the map twice when the server restarts and change map immediately
|
||||
- Fix the first person model not matching the player model
|
||||
|
||||
#### General
|
||||
|
||||
- Fix letters with diacritic not being parsed nor displayed correctly in Spearhead and Breakthrough.
|
||||
- Fix a crash that would occur on some custom maps with a lot of grid patches (increased `MAX_PATCH_PLANES`).
|
||||
- Fix a rare crash that would occur when rendering static models under certain configurations.
|
||||
- Fix a stack overflow crash that would occur with a name of more than 30 characters.
|
||||
|
||||
#### AI
|
||||
|
||||
- Fix singleplayer AI not aiming at the enemy while taking cover
|
||||
- Fix singleplayer AI not dropping weapons if forcedropweapon is set on the sentient and weapon drops are disabled in the level (should be better for Breakthrough single-player maps)
|
||||
- Fix a random crash that would occur when using multiplayer bots
|
||||
- Improved multiplayer bot logic
|
||||
- Fix the match not ending after the clock reached 0:00 in round-based games
|
||||
|
||||
#### Game
|
||||
|
||||
- Fix doors closing immediately when blocked (this bug also occurs in the original game)
|
||||
- Fix smoke grenades not reapparing when loading from save
|
||||
- Fix vehicle tank tandem causing a crash when a single turret was attached
|
||||
- Make players non-solid when they're a passenger in a vehicle (fixes players getting hit/damaged by the moving vehicle)
|
||||
- Prevent the player from going out of the maximum world bounds in noclip mode (as in mohaas/mohaab)
|
||||
- Prevent the player from shooting silently by firing and dropping the weapon at the exact same time (this is trick is possible in the original game)
|
||||
- When a door is blocked (voluntarily by a player or not), it will now try to open again in the other direction, to make the door not impossible to open (this is also an issue in the original game)
|
||||
|
||||
#### Multiplayer
|
||||
|
||||
- Fix game messages not having a newline
|
||||
- Fix letters with accents not displaying in the chat box
|
||||
- Fix a bug that would make the player die or spawn with no inventory. This occurs when getting killed and respawning immediately (this bug also occurs in the original game)
|
||||
- Fix an issue where remote clients would lose track of other clients team that have changed their name
|
||||
- Fix players getting the score from previous maps if they reconnect at the right moment (this bug also occurs in the original game)
|
||||
- Fix players deaths (or total kills) being added twice in round-based matches
|
||||
- Fix spawn metrics being terrible in FFA (like players respawning right behind other players)
|
||||
- Fix teamkill kick not displayed in Spearhead and Breakthrough
|
||||
|
||||
#### Server
|
||||
|
||||
- Fix the result of the `status` command which prevented tools like `Advanced Security` from getting IP addresses (note: `Advanced Security` doesn't support IPv6 addresses)
|
||||
- Fix an issue where connecting clients would disconnect with the error `tried to parse cg message without cgame loaded`. This issue occurs in original 1.11, but was fixed in original 2.0 (Spearhead and Breakthrough)
|
||||
|
||||
#### UI
|
||||
|
||||
- Fix an issue when resizing an in-game window, the window would stop being resized when the mouse was rapidly moving
|
||||
- Fix huddraw elements being wrongly positioned on wide screen when elements have virtualscale enabled
|
||||
- Fix pulldown menus being improperly focused and activated at the same time
|
||||
- Fix the crosshair being too small or hidden when a lower `Texture Detail` value (`r_picmip`) is set
|
||||
- Properly handle long strings in the chat message box and in the game message box
|
||||
|
||||
### Changed
|
||||
|
||||
#### General
|
||||
|
||||
- Don't execute newconfig.cfg anymore as it overrides graphical settings.
|
||||
- Some errors that show in console will only print in developer mode now (`developer` set to 1), as those are not relevant for the end-user.
|
||||
- The `unnamedsoldier.cfg` configuration file will be used as a template for creating the `omconfig.cfg` configuration file if the latter doesn't exist
|
||||
|
||||
## [0.80.0] - 2024-11-24
|
||||
|
||||
### Added
|
||||
|
||||
#### Audio
|
||||
|
||||
- Add "tmvolume", so single-player scripts can adjust the music volume.
|
||||
|
||||
#### Client
|
||||
|
||||
- Add fuse stopwatch (Medal of Honor: Spearhead and Breakthrough feature).
|
||||
- Add testemitter support for creating emitters.
|
||||
- Briefings videos are now played in mohaas/mohaab.
|
||||
- The game intro is now played when the game starts.
|
||||
|
||||
#### Game module
|
||||
|
||||
- Add a server feature to tweak in-game text messages and instant messages.
|
||||
- Add a server feature to prevent unbalancing teams.
|
||||
- Add Breakthrough liberation instant messages.
|
||||
|
||||
#### Rendering
|
||||
|
||||
- Add dynamic light support for terrains
|
||||
- Add lighting for smoke FX
|
||||
- Add support for sunflares and lensflares
|
||||
- Improved the overall lighting. Objects should now be lit correctly (some issues could still occur)
|
||||
- JPEG screenshots are now supported using the `screenshotJPEG` command
|
||||
|
||||
### Fixed
|
||||
|
||||
#### Audio
|
||||
|
||||
- Ambient sounds should now play correctly on all maps.
|
||||
- Fix a crash when the sound quality was set to a value lower to `High` (which means 44 kHz).
|
||||
- Fix an occurence where some sounds would loop forever. This would occur mostly when loading a saved game.
|
||||
- Fix background ambient sounds being muted when restarting after the intermission (this is a bug in the original game).
|
||||
- The ambient sound is now completely reset on each map, which means ambient sounds from previous maps won't be heard (this is a bug in the original game).
|
||||
|
||||
#### Client
|
||||
|
||||
- Better FX
|
||||
- Fix a rare crash that would occur when loading a map.
|
||||
- Fix an issue where delayed effects wouldn't spawn, like the K5 cannon in MOH: Breakthrough, e3l3.
|
||||
- Fix animations issue when the player dies (weird shaking, etc).
|
||||
- Fix barrel water/oil leaks not showing.
|
||||
- Fix bullet holes disappearing on doors.
|
||||
- Fix emitters leaking, this would cause a massive lag in a server with a lot of players.
|
||||
- Fix issues with shaky animation in a multiplayer game, like when dying, the animation would repeat and look buggy.
|
||||
- Fix the client not being able to play on standalone non-dedicated MOH: Breakthrough servers (which would prevent awesome LAN sessions).
|
||||
- Fix the quick message mode window being shown as a full chat window.
|
||||
- In mohaas/mohaab mode, team radar icon should now blink when the teammate is talking.
|
||||
- It's now possible to navigate and play voices from the in-game voice menu.
|
||||
|
||||
#### Filesystem
|
||||
|
||||
- Fix pk3 ordering: for example, files starting with `zzzzz_name` must take precedence over `zz_name`. This should fix the issue where some mods would unexpectedly take precedence over other mods
|
||||
|
||||
#### General
|
||||
|
||||
- Fix a crash that could occur when no valid animation exist for a model.
|
||||
- Fix long subtitles not being displayed.
|
||||
- Lowered log verbosity to avoid spamming console with useless stuff. Set `developer` to 1 for more verbosity.
|
||||
- Missing animations are no longer missing.
|
||||
|
||||
#### Rendering
|
||||
|
||||
- Dynamic lights are now rendered properly and they no longer cause rendering artifacts all over the place
|
||||
- Fix a crash that would occur in terrain code on some platforms
|
||||
- Fix static models being incorrectly culled/hidden
|
||||
- Fix water and oceans being strangely deformed
|
||||
- Improved the overall lighting. Objects should now be lit correctly (some issues could still occur)
|
||||
- Sky seams and similar graphical artifacts should no longer be seen on most configurations
|
||||
|
||||
#### Server
|
||||
|
||||
- Don't send pak names to clients if download (`sv_allowDownload`) is disabled
|
||||
- Fix animations not playing (like in e2l1) when they are played while the server is starting
|
||||
- Fix an hang (infinite loop) that would occur when sv_fps is above 1000 (this bug also occurs in the original game)
|
||||
- Fix entities being sent through skyportals
|
||||
- Fix `status` returning too long columns for some programs
|
||||
- Fix velocity being incorrect on ARM systems due to a signed integer overflow
|
||||
- Reject demo clients on full servers
|
||||
- Reject non-Breakthrough clients when targeting Breakthrough
|
||||
|
||||
#### UI
|
||||
|
||||
- Fix a bug where the game would get stuck in the loading screen if the loading screen doesn't have a "continue" button
|
||||
- Fix bugs in the UI map rotation list when adding/applying
|
||||
- Improved in-game Notepad support
|
||||
- The UI should no longer lock up when refreshing/canceling the server list (this bug also occurs in the original game)
|
||||
|
||||
### Changed
|
||||
|
||||
#### Client
|
||||
|
||||
- As a protection, stufftext commands (commands that the server want clients to execute) are now filtered out, only some stufftext commands are allowed to prevent any alteration from a remote server.
|
||||
- Animations now play smoothly, a lower timescale won't result in a poorly laggy animation anymore (this is an issue in the original game).
|
||||
|
||||
#### Game
|
||||
|
||||
- Don't allow lean in single-player in the base game.
|
||||
- Don't count telefrags as teamkills (this is an issue in the original game).
|
||||
- Fix a bug where the map would not end when the remaining time left reached 0:00 and the fraglimit was set
|
||||
- Fix a crash that would occur when loading a saved game
|
||||
- Fix a memory leak issue that can be seen after a long play time, some of the memory leaks also occur in the original game
|
||||
- Fix AI animations
|
||||
- Fix AI incorrectly holding a turret too far away
|
||||
- Fix AI moving incorrectly after loading from save
|
||||
- Fix AI not turning away from walls
|
||||
- Fix AI not being able to see through a window frame
|
||||
- Fix AI running too slowly, and a rare occurence where AIs would get stuck when going down the stairs
|
||||
- Fix an issue where bullets would not hit anything behind triggers in Allied Assault, like in m2l3 from inside the vent
|
||||
- Fix an issue where the player would be invulnerable when using heavy weapons, like the Granatwerfer
|
||||
- Fix an issue where some AIs would not have a speech animation when speaking
|
||||
- Fix barrel jittering
|
||||
- Fix errors related to the script lexer & grammar
|
||||
- Fix Flak88 and Nebelwerfer destroyed models in Spearhead and Breakthrough
|
||||
- Fix jeep vehicle position on m3l2
|
||||
- Fix ladder positioning (the issue would only occur on 64-bit systems)
|
||||
- Fix player position on a vehicle turret gun (like the AA gun, or the Granatwerfer)
|
||||
- Fix sentients still dropping their weapons even if the level has disabled weapon drops
|
||||
- Fix some rare mods not loading properly due to an error in the script lexer
|
||||
- Fix some script models not having any animation after loading from save
|
||||
- Fix the barrel jittering
|
||||
- Fix the roof top door on e1l3 (with Gino Corelli) opening when closing the handle (due to an incorrect returned result of a script command)
|
||||
- Fix vehicle turret gun not making any sounds
|
||||
- Fix vehicle turret gun being out of sync with the vehicle after loading from save (this issue also occurs in the original game)
|
||||
- Fix weapon pickups where picking up a weapon with only 1 ammo remaining (like a grenade) would not pick the ammo up (this is a bug in the original game)
|
||||
- Fix weapprev/weappnext/weapdrop switching to inventory item like binoculars
|
||||
- Navigation fixes
|
||||
|
||||
#### Server
|
||||
|
||||
- Clients who are not sent to others (invisible + not sent to snapshots) won't be able to use anything like doors, and won't be able to send instant/voice messages
|
||||
|
||||
## [0.70.0] - 2024-09-02
|
||||
|
||||
### Added
|
||||
|
||||
#### Binaries
|
||||
|
||||
- This new version ships with binaries for PowerPC, PowerPC64 and PowerPC64 Little-Endian. Currently experimental and the client may not work correctly.
|
||||
- For linux binaries, AARCH64 was renamed to ARM64
|
||||
|
||||
#### General
|
||||
|
||||
- Add a default idle animation for TIKI files not having any animation
|
||||
|
||||
#### Rendering
|
||||
|
||||
- Add support for DDS textures
|
||||
- Add morphs: dynamic facial expressions for characters
|
||||
- Implemented sky portal
|
||||
|
||||
#### Sound
|
||||
|
||||
- Add OpenAL support:
|
||||
- Ambient sound (soundtrack)
|
||||
- HRTF can be used on OpenAL by setting the speaker type to `Headphones`
|
||||
- Loopsounds
|
||||
- Music support (triggered music)
|
||||
- Proper sound entity spatialization
|
||||
- Streamed sounds - audio files (such as music) are streamed from disk without them being entirely loaded in memory
|
||||
- Volume/Pitch variation
|
||||
|
||||
#### UI
|
||||
|
||||
- Add in-game Notepad (thanks to @pryon)
|
||||
- Add screenshots for saved games
|
||||
|
||||
### Fixed
|
||||
|
||||
#### General
|
||||
|
||||
- Animation fixes
|
||||
- Fix a crash related to localization (due to some strings containing a backtick)
|
||||
- Fix some models having surfaces without a shader
|
||||
- Fix entity collision
|
||||
- Fix bad terrain/patch collision with grenades
|
||||
- Fix improper collision on fences - it's now possible to target flak88 behind barbwires with binoculars
|
||||
- Fix load/save game crashes
|
||||
- Networking fixes
|
||||
- Improved support for big-endian architectures (like PowerPC 32/64 bits and ARM in big-endian mode)
|
||||
|
||||
#### Client
|
||||
|
||||
- Fix entities being incorrectly attached sometimes
|
||||
|
||||
##### CGame module
|
||||
|
||||
- Bullet hit effects like snow, water and glass are fixed, as well as bullet tracers and flesh impacts
|
||||
- Corrected Gewehrgranate viewmodel animations
|
||||
- Fix occasional crashes due to volumetric smoke
|
||||
- Fix marks not showing on entities like doors
|
||||
- Invisible models fix
|
||||
- Rain/snow should now be properly working
|
||||
- Various fixes for special FX
|
||||
|
||||
#### Server
|
||||
|
||||
- Fix configstrings overflow on big maps, like t1l2 on MOH: Spearhead
|
||||
|
||||
##### Game module
|
||||
|
||||
- Door fixes, like door opening in the wrong direction
|
||||
- Physics fixes, like grenade bouncing
|
||||
- Fix AIs: they're less dumb than on previous versions
|
||||
- Fix the artillery system (ProjectileGenerator) - fixes for t2l3, t2l4...
|
||||
- Fix game loading/saving having wrong datas
|
||||
- Fix the scoreboard on FFA and for spectators
|
||||
- Fix the script engine - all scripts must be working now
|
||||
- Fix an issue with spawnpoints where the player wouldn't spawn at the correct spot
|
||||
- The mine detector correctly detect mines, in single-player
|
||||
- The mission date (such as "JUNE 6, 1944") is now displayed
|
||||
- The vehicle system is now fully working properly: no more vehicles getting stuck
|
||||
- Singleplayer maps are all completable now (although some rare bugs may occur)
|
||||
|
||||
#### Rendering
|
||||
|
||||
- Fix crashes related to terrain
|
||||
- Fix crashes related to `vid_restart` and `snd_restart`
|
||||
- Fix strange lighting when `Full entity lighting` is disabled
|
||||
- Lighting related fixes
|
||||
- Most shaders should correctly load
|
||||
|
||||
#### UI
|
||||
|
||||
- Fix crashes related to UI
|
||||
- Fix `vid_restart` breaking the UI
|
||||
- Fix the multiplayer map picker displaying the same maps twice
|
||||
- Player model picker should now be displaying characters properly
|
||||
- Properly show the "disconnected" menu when the client get disconnected from a server
|
||||
|
||||
## [0.61.0] - 2024-01-08
|
||||
|
||||
### Added
|
||||
|
||||
#### Game Module
|
||||
|
||||
- Landmines are now fully working (a **Medal of Honor: Allied Assault Breakthrough** feature)
|
||||
- Script command documentation can now be exported properly using `dumpallclasses` command
|
||||
|
||||
#### Client
|
||||
|
||||
- Add single-player map list and multiplayer map list
|
||||
- Add map rotation list for multiplayer
|
||||
- Add player model selection list
|
||||
- Add LAN game searcher
|
||||
- Add subtitles, centerprint, and locationprint
|
||||
- Add the miniconsole
|
||||
- Binds can now be set
|
||||
|
||||
### Fixed
|
||||
|
||||
#### Game module
|
||||
|
||||
- Crash fixes
|
||||
- Fix callvote with invalid strings
|
||||
- Fix grenade crash
|
||||
- Fix weapons being attached to the wrong player's hand under some circumstances
|
||||
- Players should now get the correct loadout in multiplayer
|
||||
- `sv_fps` with a value higher than 20 shouldn't cause issues anymore with animations
|
||||
|
||||
#### Client
|
||||
|
||||
- 3D player models are now shown in the main menu screen
|
||||
- Configstring can now be handled in multiple chunks
|
||||
- Fix mohaas server version mismatch in the server list when using mohaab target game
|
||||
- Fix vote menu not working
|
||||
- Fix UI sounds not working
|
||||
- Fix locationprint and centerprint not working
|
||||
|
||||
## [0.60.2] - 2023-11-29
|
||||
|
||||
### Fixed
|
||||
|
||||
#### Game Module
|
||||
- Fix pain animations
|
||||
- Fix portable turret animations
|
||||
- Fix game crashing when saving and/or loading from save
|
||||
|
||||
#### ClientGame Module
|
||||
- Fix for the client game module not hiding the stats screen
|
||||
|
||||
#### Server
|
||||
- Fix level file archive
|
||||
|
||||
## [0.60.1] - 2023-11-15
|
||||
|
||||
### Changed
|
||||
|
||||
- The carryable turret (packed MG42 turret) can now be placed
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix bullet tracers, they should now be working correctly
|
||||
- Fix a bug where player could get stuck in turret mode after the turret was removed
|
||||
|
||||
## [0.60.0] - 2023-11-15
|
||||
|
||||
### Added
|
||||
|
||||
- Add non-pvs feature (hide players from other clients who cannot see them)
|
||||
- Add more SH and BT features
|
||||
- Add ioq3 server features
|
||||
- Mostly implemented AI Actor (still buggy)
|
||||
- Implemented Vehicle and TurretGun from BT 2.40
|
||||
- Implemented voting system
|
||||
|
||||
### Changed
|
||||
|
||||
- Configs are now stored in the homepath
|
||||
- Binaries are now stored in the root folder (no need to replace existing MOH binaries anymore)
|
||||
- Crashes fixes
|
||||
- Rendering fixes, client fixes, game fixes and script engine fixes
|
||||
|
||||
## [0.58.1] - 2023-08-21
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix demo recordings not working with different protocols
|
||||
- Publish `sv_fps` in server info variables
|
||||
|
||||
## [0.58.0] - 2023-08-20
|
||||
|
||||
### Added
|
||||
|
||||
- Multiplayer bot support
|
||||
- Server browser
|
||||
|
||||
#### Spearhead and Breakthrough features
|
||||
|
||||
- Animated farplanes
|
||||
- Bullets through wood/metal
|
||||
- Smokes
|
||||
- Sprint
|
||||
- Compass radar (icon of teammates on the compass)
|
||||
- Landmines
|
||||
- Tug-of-War and Liberation game types
|
||||
- ...
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix bugs, and crashes
|
||||
- Fix training map not working
|
||||
- The script engine should now be fully compatible with mohaa scripts
|
||||
|
||||
## [0.57.0] - 2023-07-25
|
||||
|
||||
### Added
|
||||
|
||||
#### Renderer
|
||||
|
||||
- Sphere lights for entities
|
||||
- Light grid entity lighting
|
||||
- Light grid support from Spearhead and Breakthrough
|
||||
|
||||
#### Game
|
||||
|
||||
- Allow/disallow leaning while moving (Spearhead and Breakthrough)
|
||||
|
||||
## [0.56.0] - 2023-07-23
|
||||
|
||||
### Added
|
||||
|
||||
- Add bullets, bullet trails, emitters, explosions, marks, model attachment, special effects, viewmodel anim
|
||||
- Add fog, font, dynamic lights, shader fade, sprite, trees
|
||||
|
||||
### Changed
|
||||
|
||||
- Use a single executable to play on mohaa, moh_spearhead or moh_breakthrough servers, by starting openmohaa with `+set com_target_game x` commandline (check README)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix disconnect menu not working
|
||||
- Fix compass not working
|
||||
- Fix crashes
|
||||
|
||||
## [0.55.3] - 2023-06-27
|
||||
|
||||
## [0.55.2] - 2023-06-27
|
||||
|
||||
### Added
|
||||
|
||||
- Add Breakthrough-compatible executable
|
||||
|
||||
## [0.55.1] - 2023-06-24
|
||||
|
||||
## [0.54.0] - 2023-05-30
|
||||
|
||||
### Added
|
||||
|
||||
- ioquake3 backport
|
||||
- SDL2 support, which means input, rendering and sound improvements
|
||||
- Better console support (using OS console host, rather than a custom Windows 95 console)
|
||||
- Rendering improvement: sprite support, light glow support (light coronas), more shaders support, minor fixes, and beam fixes
|
||||
- Sound improvement: MP3 support + better sound/format support
|
||||
- Client game: better emitter support, scoreboard fixes, kar98 overlay fix
|
||||
- Networking improvement
|
||||
- UI improvement: using Spearhead/Breakthrough gmbox/dmbox placement
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix compass scale
|
||||
|
||||
## [0.53.2] - 2023-05-23
|
||||
|
||||
### Added
|
||||
|
||||
- ARM support
|
||||
- DDS texture support
|
||||
- Death messages on Spearhead/Breakthrough
|
||||
|
||||
### Fixed
|
||||
|
||||
- More SH/BT fixes
|
||||
- Networking fixes
|
||||
- UI/HUD fixes
|
||||
- Weapon binding fixes
|
||||
|
||||
## [0.53.1] - 2023-05-22
|
||||
|
||||
### Fixed
|
||||
|
||||
- Crashes fixes
|
||||
- Minor fixes
|
||||
- Rendering fixes (especially for menus in SH/BT)
|
||||
- Scoreboard fixes for SH/BT
|
||||
|
||||
## [0.53.0] - 2023-05-21
|
||||
|
||||
### Added
|
||||
|
||||
- Add support for Spearhead (TA/Team Assault) and Breakthrough (TT/Team Tactics) server/client
|
||||
|
||||
### Fixed
|
||||
|
||||
- Bug fixes
|
||||
|
||||
## [0.52.0] - 2023-05-21
|
||||
|
||||
### Changed
|
||||
|
||||
- Use semantic version number
|
||||
|
||||
### Fixed
|
||||
|
||||
- Rendering fixes
|
||||
- UI fixes
|
||||
|
||||
## [0.51a] - 2023-05-20
|
||||
|
||||
### Fixed
|
||||
|
||||
- Crash fixes
|
||||
- Lighting tweaks
|
||||
- Performance fixes
|
||||
|
||||
## [0.51] - 2023-05-20
|
||||
|
||||
### Added
|
||||
|
||||
- Loading screens
|
||||
- Scoreboard
|
||||
- Weapon buttons
|
||||
|
||||
## [0.50a] - 2023-05-19
|
||||
|
||||
### Added
|
||||
|
||||
- Fog support
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix static model
|
||||
|
||||
## [0.50] - 2023-05-18
|
||||
|
||||
### Added
|
||||
|
||||
- Almost full LOD terrain support
|
||||
- Basic sound implementation
|
||||
- Better multi-texture support
|
||||
|
||||
## [0.49f] - 2023-05-18
|
||||
|
||||
### Added
|
||||
|
||||
- Client binaries
|
||||
|
||||
## [0.49e] - 2023-02-05
|
||||
|
||||
## [0.49d] - 2023-02-05
|
||||
|
||||
## [0.49c] - 2023-02-03
|
||||
|
||||
## [0.49b] - 2023-01-30
|
||||
|
||||
## [0.49] - 2023-01-29
|
||||
|
||||
### Added
|
||||
|
||||
- This is the first public release on GitHub with CMake support. Dedicated-only binaries.
|
||||
|
||||
[unreleased]: https://github.com/openmoh/openmohaa/compare/v0.82.1...HEAD
|
||||
[0.82.1]: https://github.com/openmoh/openmohaa/compare/v0.82.0...v0.82.1
|
||||
[0.82.0]: https://github.com/openmoh/openmohaa/compare/v0.81.1...v0.82.0
|
||||
[0.81.1]: https://github.com/openmoh/openmohaa/compare/v0.81.0...v0.81.1
|
||||
[0.81.0]: https://github.com/openmoh/openmohaa/compare/v0.80.0...v0.81.0
|
||||
[0.80.0]: https://github.com/openmoh/openmohaa/compare/v0.70.0...v0.80.0
|
||||
[0.70.0]: https://github.com/openmoh/openmohaa/compare/v0.61.0...v0.70.0
|
||||
[0.61.0]: https://github.com/openmoh/openmohaa/compare/v0.60.2...v0.61.0
|
||||
[0.60.2]: https://github.com/openmoh/openmohaa/compare/v0.60.1...v0.60.2
|
||||
[0.60.1]: https://github.com/openmoh/openmohaa/compare/v0.60.0...v0.60.1
|
||||
[0.60.0]: https://github.com/openmoh/openmohaa/compare/v0.58.0...v0.60.0
|
||||
[0.58.1]: https://github.com/openmoh/openmohaa/compare/v0.58.0...v0.58.1
|
||||
[0.58.0]: https://github.com/openmoh/openmohaa/compare/v0.57.0...v0.58.0
|
||||
[0.57.0]: https://github.com/openmoh/openmohaa/compare/v0.56.0...v0.57.0
|
||||
[0.56.0]: https://github.com/openmoh/openmohaa/compare/v0.55.3...v0.56.0
|
||||
[0.55.3]: https://github.com/openmoh/openmohaa/compare/v0.55.2...v0.55.3
|
||||
[0.55.2]: https://github.com/openmoh/openmohaa/compare/v0.55.1...v0.55.2
|
||||
[0.55.1]: https://github.com/openmoh/openmohaa/compare/v0.54.0...v0.55.1
|
||||
[0.54.0]: https://github.com/openmoh/openmohaa/compare/v0.53.2...v0.54.0
|
||||
[0.53.2]: https://github.com/openmoh/openmohaa/compare/v0.53.1...v0.53.2
|
||||
[0.53.1]: https://github.com/openmoh/openmohaa/compare/v0.53.0...v0.53.1
|
||||
[0.53.0]: https://github.com/openmoh/openmohaa/compare/v0.52.0...v0.53.0
|
||||
[0.52.0]: https://github.com/openmoh/openmohaa/compare/0.51a...v0.52.0
|
||||
[0.51a]: https://github.com/openmoh/openmohaa/compare/0.51...0.51a
|
||||
[0.51]: https://github.com/openmoh/openmohaa/compare/0.50a...0.51
|
||||
[0.50a]: https://github.com/openmoh/openmohaa/compare/0.50...0.50a
|
||||
[0.50]: https://github.com/openmoh/openmohaa/compare/0.49f...0.50
|
||||
[0.49f]: https://github.com/openmoh/openmohaa/compare/0.49e...0.49f
|
||||
[0.49e]: https://github.com/openmoh/openmohaa/compare/0.49d...0.49e
|
||||
[0.49d]: https://github.com/openmoh/openmohaa/compare/0.49c...0.49d
|
||||
[0.49c]: https://github.com/openmoh/openmohaa/compare/0.49b...0.49c
|
||||
[0.49b]: https://github.com/openmoh/openmohaa/compare/0.49...0.49b
|
||||
[0.49]: https://github.com/openmoh/openmohaa/releases/tag/0.49
|
||||
+74
-259
@@ -1,272 +1,87 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
project(openmohaa)
|
||||
cmake_minimum_required(VERSION 3.25)
|
||||
|
||||
include(misc/cmake/TargetArch.cmake)
|
||||
|
||||
target_architecture(TARGET_ARCH)
|
||||
list(LENGTH TARGET_ARCH TARGET_ARCH_COUNT)
|
||||
|
||||
set(USE_INTERNAL_LIBS ON)
|
||||
if(USE_SYSTEM_LIBS)
|
||||
set(USE_INTERNAL_LIBS OFF)
|
||||
if(POLICY CMP0177)
|
||||
# Policy CMP0177: install() DESTINATION paths are normalized
|
||||
# Introduced in CMake 3.31
|
||||
cmake_policy(SET CMP0177 NEW)
|
||||
endif()
|
||||
|
||||
option(USE_INTERNAL_JPEG "If set, use bundled libjpeg." ${USE_INTERNAL_LIBS})
|
||||
option(USE_INTERNAL_MAD "If set, use bundled libmad." ${USE_INTERNAL_LIBS})
|
||||
option(USE_INTERNAL_ZLIB "If set, use bundled zlib." ${USE_INTERNAL_LIBS})
|
||||
option(USE_RENDERER_DLOPEN "Whether to compile the renderer as separate pluggable modules" OFF)
|
||||
option(TARGET_LOCAL_SYSTEM "Indicate that the project will be compiled and installed for the local system" OFF)
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
||||
include(identity)
|
||||
|
||||
if(TARGET_GAME_TYPE)
|
||||
message(SEND_ERROR "TARGET_GAME_TYPE is now unsupported, it is now done at runtime.")
|
||||
project(${PROJECT_NAME} VERSION ${PROJECT_VERSION} LANGUAGES C CXX)
|
||||
|
||||
option(BUILD_SERVER "Build dedicated server" ON)
|
||||
option(BUILD_CLIENT "Build client" ON)
|
||||
option(BUILD_RENDERER_GL1 "Build GL1 renderer" ON)
|
||||
option(BUILD_RENDERER_GL2 "Build GL2 renderer" OFF)
|
||||
option(BUILD_GAME_LIBRARIES "Build game module libraries" ON)
|
||||
option(BUILD_GAME_QVMS "Build game module qvms" ON)
|
||||
option(BUILD_STANDALONE "Build binaries for standalone games" OFF)
|
||||
|
||||
option(USE_RENDERER_DLOPEN "Dynamically load the renderer(s)" ON)
|
||||
option(USE_OPENAL "OpenAL audio" ON)
|
||||
option(USE_OPENAL_DLOPEN "Dynamically load OpenAL" ON)
|
||||
option(USE_HTTP "HTTP download support" ON)
|
||||
option(USE_CODEC_VORBIS "Ogg Vorbis support" ON)
|
||||
option(USE_CODEC_OPUS "Ogg Opus support" ON)
|
||||
option(USE_CODEC_MAD "MP3 support" ON)
|
||||
option(USE_VOIP "Voice chat" OFF)
|
||||
option(USE_MUMBLE "Mumble support" OFF)
|
||||
option(USE_FREETYPE "Freetype font rendering" OFF)
|
||||
|
||||
option(USE_INTERNAL_LIBS "Use internally packaged libraries" ON)
|
||||
option(USE_INTERNAL_SDL "Use internal SDL binary (if available)" ${USE_INTERNAL_LIBS})
|
||||
option(USE_INTERNAL_ZLIB "Use internal copy of zlib" ${USE_INTERNAL_LIBS})
|
||||
option(USE_INTERNAL_JPEG "Use internal copy of libjpeg" ${USE_INTERNAL_LIBS})
|
||||
option(USE_INTERNAL_OGG "Use internal copy of ogg" ${USE_INTERNAL_LIBS})
|
||||
option(USE_INTERNAL_VORBIS "Use internal copy of vorbis" ${USE_INTERNAL_LIBS})
|
||||
option(USE_INTERNAL_OPUS "Use internal copy of opus" ${USE_INTERNAL_LIBS})
|
||||
option(USE_INTERNAL_MAD "Use internal copy of libmad" ${USE_INTERNAL_LIBS})
|
||||
|
||||
# Release build by default, set externally if you want something else
|
||||
if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
set(TARGET_BASE_GAME "./")
|
||||
set(CMAKE_DEBUG_POSTFIX "-dbg")
|
||||
|
||||
#
|
||||
# Microsoft compiler specific parameters
|
||||
#
|
||||
if(MSVC)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
# Treat no return type as error
|
||||
add_compile_options(/we4715)
|
||||
# Try to enable LTO by default
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT IPO_SUPPORTED)
|
||||
if(IPO_SUPPORTED)
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG FALSE)
|
||||
endif()
|
||||
|
||||
#
|
||||
# Clang and GCC specific parameters
|
||||
#
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
add_compile_options(-Wno-comment)
|
||||
# Treat no return type as error
|
||||
add_compile_options(-Werror=return-type)
|
||||
set(CMAKE_C_STANDARD 17)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_SHARED_LIBRARY_PREFIX "")
|
||||
|
||||
set(SOURCE_DIR ${CMAKE_SOURCE_DIR}/code)
|
||||
|
||||
# Enable unit testing
|
||||
include(CTest)
|
||||
|
||||
if(DEFINED ENV{SOURCE_DATE_EPOCH})
|
||||
string(TIMESTAMP PRODUCT_DATE "%b %d %Y" UTC)
|
||||
add_compile_definitions(PRODUCT_DATE="${PRODUCT_DATE}")
|
||||
endif()
|
||||
|
||||
#
|
||||
# Clang specific parameters
|
||||
#
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
# Ignore warnings for code like 'assert("Assert string")'
|
||||
add_compile_options(-Wno-pointer-bool-conversion)
|
||||
endif()
|
||||
include(compilers/all)
|
||||
include(platforms/all)
|
||||
include(libraries/all)
|
||||
include(deploy/all)
|
||||
|
||||
#
|
||||
# GCC specific parameters
|
||||
#
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
# Add this option on gcc to prevent functions from having the STB_GNU_UNIQUE binding
|
||||
# Otherwise, it would prevent libraries from being unloaded
|
||||
# which will cause undefined behavior and crashes due to memory corruption
|
||||
add_compile_options(-fno-gnu-unique)
|
||||
endif()
|
||||
include(version)
|
||||
|
||||
if(DEBUG_MEMORY)
|
||||
add_definitions(-D_DEBUG_MEM)
|
||||
endif()
|
||||
include(server)
|
||||
include(renderer_gl1)
|
||||
include(renderer_gl2)
|
||||
include(client)
|
||||
include(basegame)
|
||||
#include(missionpack)
|
||||
include(launcher)
|
||||
|
||||
if("${TARGET_ARCH}" STREQUAL "i386")
|
||||
set(TARGET_ARCH_SUFFIX "x86")
|
||||
else()
|
||||
set(TARGET_ARCH_SUFFIX ${TARGET_ARCH})
|
||||
endif()
|
||||
|
||||
message(STATUS "Architecture detected: ${TARGET_ARCH}")
|
||||
|
||||
if(TARGET_LOCAL_SYSTEM)
|
||||
add_definitions(-DTARGET_LOCAL_SYSTEM)
|
||||
# As it targets the local system, no need to know about the architecture used
|
||||
set(TARGET_BIN_SUFFIX "")
|
||||
message(STATUS "Binary suffix will not be used as the local system is the target")
|
||||
elseif(${TARGET_ARCH_COUNT} GREATER 1)
|
||||
add_definitions(-DTARGET_MULTIPLE_ARCHITECTURES)
|
||||
set(TARGET_BIN_SUFFIX ".multiarch")
|
||||
message(STATUS "Multiple architectures were specified, suffix set to 'multiarch'.")
|
||||
else()
|
||||
set(TARGET_BIN_SUFFIX ".${TARGET_ARCH}")
|
||||
message(STATUS "Binary suffix set to '${TARGET_ARCH_SUFFIX}'.")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(TARGET_PLATFORM_PREFIX "")
|
||||
message(STATUS "Using Win32 naming convention")
|
||||
elseif(UNIX)
|
||||
set(TARGET_PLATFORM_PREFIX "")
|
||||
message(STATUS "Using Unix naming convention")
|
||||
else()
|
||||
set(TARGET_PLATFORM_PREFIX "")
|
||||
endif()
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
add_compile_definitions(_DEBUG)
|
||||
|
||||
# NOTE: The following may mess up function importation
|
||||
#if(UNIX)
|
||||
# # Enable all exports so all functions name can be seen during executable crash
|
||||
# set(CMAKE_ENABLE_EXPORTS ON)
|
||||
# message(STATUS "Enabling exports on Unix for backtrace")
|
||||
#endif()
|
||||
else()
|
||||
# Non-debug builds
|
||||
add_compile_definitions(NDEBUG)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
# macOS doesn't search the executable path by default
|
||||
# so, locate libraries like SDL in the executable path
|
||||
set(CMAKE_INSTALL_RPATH "@executable_path")
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
|
||||
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
# Set the visibility to hidden on macOS to prevent shared libraries from
|
||||
# using functions in the executable
|
||||
# it's ok to hide them because the backtrace on macOS will still print the name of the functions
|
||||
add_compile_options(-fvisibility=hidden)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#
|
||||
# Setup the installation directory
|
||||
#
|
||||
if(WIN32)
|
||||
# By default, both DLLs and EXEs are in the same directory
|
||||
set(CMAKE_DEFAULT_INSTALL_RUNTIME_DIR bin)
|
||||
set(BIN_INSTALL_SUBDIR ".")
|
||||
set(LIB_INSTALL_SUBDIR ".")
|
||||
else()
|
||||
# Unix
|
||||
set(CMAKE_DEFAULT_INSTALL_RUNTIME_DIR lib${CMAKE_LIB_SUFFIX})
|
||||
set(BIN_INSTALL_SUBDIR ${CMAKE_PROJECT_NAME})
|
||||
set(LIB_INSTALL_SUBDIR ${CMAKE_PROJECT_NAME})
|
||||
endif()
|
||||
|
||||
# By default, put both binaries and shared libraries in the same directory
|
||||
# the game uses internal shared libraries that must be in the same folder as the binaries
|
||||
set(CMAKE_INSTALL_BINDIR ${CMAKE_DEFAULT_INSTALL_RUNTIME_DIR} CACHE PATH "Binary dir")
|
||||
set(CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_BINDIR} CACHE PATH "Library dir")
|
||||
include(GNUInstallDirs)
|
||||
|
||||
#
|
||||
# Common stuff
|
||||
#
|
||||
add_subdirectory("code/qcommon")
|
||||
add_subdirectory("code/gamespy")
|
||||
|
||||
#
|
||||
# Application
|
||||
#
|
||||
add_subdirectory("code/sys")
|
||||
|
||||
##
|
||||
## Server app
|
||||
##
|
||||
add_subdirectory("code/server")
|
||||
|
||||
add_executable(omohaaded "code/null/null_client.c" "code/null/null_input.c" "code/null/null_snddma.c")
|
||||
target_compile_definitions(omohaaded PRIVATE APP_MODULE DEDICATED)
|
||||
target_compile_features(omohaaded PUBLIC cxx_nullptr)
|
||||
target_compile_features(omohaaded PUBLIC c_variadic_macros)
|
||||
target_link_libraries(omohaaded PRIVATE omohserver)
|
||||
target_link_libraries(omohaaded PRIVATE syslib)
|
||||
target_link_libraries(omohaaded PRIVATE qcommon qcommon_standalone)
|
||||
|
||||
# Add the gamespy dependency
|
||||
target_include_directories(omohaaded PUBLIC "code/qcommon" "code/script" "code/gamespy" "code/server")
|
||||
set_target_properties(omohaaded PROPERTIES OUTPUT_NAME "omohaaded${TARGET_BIN_SUFFIX}")
|
||||
set_target_properties(omohaaded PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
|
||||
|
||||
INSTALL(TARGETS omohaaded DESTINATION ${CMAKE_INSTALL_BINDIR}/${BIN_INSTALL_SUBDIR})
|
||||
|
||||
if (MSVC)
|
||||
target_link_options(omohaaded PRIVATE "/MANIFEST:NO")
|
||||
INSTALL(FILES $<TARGET_PDB_FILE:omohaaded> DESTINATION ${CMAKE_INSTALL_BINDIR}/${BIN_INSTALL_SUBDIR} OPTIONAL)
|
||||
endif()
|
||||
|
||||
if (NOT BUILD_NO_CLIENT)
|
||||
##
|
||||
## Client app
|
||||
##
|
||||
option(NO_MODERN_DMA "Use older sound-system" FALSE)
|
||||
|
||||
add_subdirectory("code/client")
|
||||
add_subdirectory("code/renderercommon")
|
||||
add_subdirectory("code/sdl")
|
||||
|
||||
add_executable(openmohaa "misc/dummy.c")
|
||||
target_link_libraries(openmohaa PRIVATE syslib)
|
||||
target_link_libraries(openmohaa PRIVATE omohserver)
|
||||
target_link_libraries(openmohaa PRIVATE omohclient)
|
||||
target_link_libraries(openmohaa PRIVATE omohrenderer)
|
||||
target_link_libraries(openmohaa PRIVATE qcommon qcommon_standalone)
|
||||
|
||||
# Add the gamespy dependency
|
||||
target_include_directories(openmohaa PUBLIC "code/qcommon" "code/script" "code/gamespy" "code/server" "code/client" "code/uilib")
|
||||
set_target_properties(openmohaa PROPERTIES OUTPUT_NAME "openmohaa${TARGET_BIN_SUFFIX}")
|
||||
set_target_properties(openmohaa PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
|
||||
|
||||
if(USE_INTERNAL_JPEG)
|
||||
target_include_directories(openmohaa PUBLIC "code/jpeg-8c")
|
||||
target_link_libraries(openmohaa PRIVATE jpeg8)
|
||||
else()
|
||||
find_package(JPEG REQUIRED)
|
||||
target_include_directories(openmohaa PUBLIC ${JPEG_INCLUDE_DIRS})
|
||||
target_link_libraries(openmohaa PRIVATE ${JPEG_LIBRARIES})
|
||||
endif()
|
||||
|
||||
INSTALL(TARGETS openmohaa DESTINATION ${CMAKE_INSTALL_BINDIR}/${BIN_INSTALL_SUBDIR})
|
||||
|
||||
if (MSVC)
|
||||
target_link_options(openmohaa PRIVATE "/MANIFEST:NO")
|
||||
INSTALL(FILES $<TARGET_PDB_FILE:openmohaa> DESTINATION ${CMAKE_INSTALL_BINDIR}/${BIN_INSTALL_SUBDIR} OPTIONAL)
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
#
|
||||
# Desktop entries installation on Unix
|
||||
#
|
||||
set(TARGET_ARCH ${TARGET_BIN_SUFFIX})
|
||||
|
||||
# Configure the .desktop entries with the arch suffix
|
||||
configure_file(
|
||||
misc/linux/org.openmoh.openmohaa.desktop.in
|
||||
${CMAKE_BINARY_DIR}/misc/linux/org.openmoh.openmohaa.desktop
|
||||
@ONLY
|
||||
)
|
||||
configure_file(
|
||||
misc/linux/org.openmoh.openmohaab.desktop.in
|
||||
${CMAKE_BINARY_DIR}/misc/linux/org.openmoh.openmohaab.desktop
|
||||
@ONLY
|
||||
)
|
||||
configure_file(
|
||||
misc/linux/org.openmoh.openmohaas.desktop.in
|
||||
${CMAKE_BINARY_DIR}/misc/linux/org.openmoh.openmohaas.desktop
|
||||
@ONLY
|
||||
)
|
||||
|
||||
# Install .desktop entries
|
||||
install(FILES ${CMAKE_BINARY_DIR}/misc/linux/org.openmoh.openmohaa.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
|
||||
install(FILES ${CMAKE_BINARY_DIR}/misc/linux/org.openmoh.openmohaab.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
|
||||
install(FILES ${CMAKE_BINARY_DIR}/misc/linux/org.openmoh.openmohaas.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
|
||||
|
||||
install(FILES misc/linux/org.openmoh.openmohaa.metainfo.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo)
|
||||
|
||||
install(FILES misc/openmohaa.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/symbolic/apps/ RENAME org.openmoh.openmohaa.svg)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#
|
||||
# Launcher
|
||||
#
|
||||
add_subdirectory(code/Launcher)
|
||||
|
||||
#
|
||||
# uninstall target
|
||||
#
|
||||
if(NOT TARGET uninstall)
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
|
||||
add_custom_target(uninstall
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
||||
endif()
|
||||
include(post_configure)
|
||||
#include(installer)
|
||||
+191
@@ -0,0 +1,191 @@
|
||||
# Contributing guidelines
|
||||
|
||||
Whether you're reporting issues or coding, follow the guidelines below to help keep the project consistent and maintainable.
|
||||
|
||||
All contributions, including **issues**, **discussions**, **code comments**, **commit messages**, and **documentation**, must be written in *English*. This ensures clarity and consistency for all contributors.
|
||||
|
||||
There are many ways to contribute. Contributions are welcome in the following areas:
|
||||
- Fixing [bugs and crashes](#issues).
|
||||
- Documentation improvements
|
||||
- Performance improvements
|
||||
- Testing
|
||||
- Helping users (issues, discussions)
|
||||
- Suggesting enhancements (via issues only)
|
||||
|
||||
New features are designed and implemented by maintainers, so the project's direction and maintenance burden stay consistent.
|
||||
|
||||
If you want to propose a new feature, please open an issue first.
|
||||
|
||||
Do not start implementing a new feature before getting approval. Pull requests that introduce unapproved features may be closed without review.
|
||||
|
||||
---
|
||||
|
||||
## Issues
|
||||
|
||||
Before opening a new issue:
|
||||
1. Make sure you're running the [latest development version](https://github.com/openmoh/openmohaa/releases/tag/dev).
|
||||
2. Check if the issue already exists.
|
||||
|
||||
When filing an issue, include as much detail as possible, this helps reproducing and fixing the problem effectively:
|
||||
- Clear description of the bug.
|
||||
- Steps to reproduce.
|
||||
- Log file (`qconsole.log`) and crash output if applicable:
|
||||
- Attach the relevant log file.
|
||||
- For crashes, paste the console output that includes the backtrace.
|
||||
- Operating System and version. Example: `Debian 13`.
|
||||
- Full game version. Example: `0.70.0-alpha+0.0b1a20dcf win_msvc64-x86_64-debug`. The version is obtained at the start of the log file, or by executing the `version` command in console.
|
||||
|
||||
## Usage of generative AI / Large language models
|
||||
|
||||
### Policy
|
||||
|
||||
This project requires that all contributions be human-authored.
|
||||
|
||||
Do not submit any code, documentation, issues, pull requests, commit messages or comments that are generated using AI or similar assistive tools (such as Microsoft Copilot, Anthropic Claude, ChatGPT...).
|
||||
|
||||
- **No AI-derived patches**. If the change was proposed by an AI, it must not be ported over "by hand". If the idea came from AI, treat is as untrusted and do your own independent implementation.
|
||||
- **No AI-assisted refactors**. Mass rewrites, LLM-based formatting, or modernization are not accepted.
|
||||
- **Enforcement**. Maintainers may request clarification. PRs suspected of AI involvement may be rejected or reverted, and may lead to a ban.
|
||||
|
||||
#### Acceptable uses
|
||||
|
||||
- **Non-generative tools** are allowed: static analyzers, formatters, linters, sanitizers, fuzzers and IDE features are fine as long they do not generate code.
|
||||
- **Translation tools** to help communicating between people.
|
||||
|
||||
### Reasoning
|
||||
|
||||
This policy exists due to:
|
||||
- **Copyright and licensing risk**. The origin of the outputs may be unclear as these tools plagiarize the original sources without permission.
|
||||
- **Security and authenticity**. AI produces plausible code but may often look wrong. This could work, but would turn into undefined behavior, vulnerabilities, or time spent in a debugger.
|
||||
- **Maintability**. Changes must be explainable and reviewable. Humans can explain tradeoffs they consciously accepted. Generated code can't. If you can't explain why a specific line exists, it shouldn't be proposed at all.
|
||||
- **Respect for maintainers**. Submitting contributions generated by these tools waste maintainers resources to review them.
|
||||
|
||||
### Responsibility
|
||||
|
||||
When submitting, you agree that:
|
||||
|
||||
- The submission **complies with this policy**. Changes must be able to be explained and justified during review.
|
||||
- The submission **can be declined** if it is **suspected to use AI** or is raising reviewability concerns.
|
||||
|
||||
## Coding
|
||||
|
||||
### Compatibility
|
||||
|
||||
All changes must stay retro-compatible with the original game:
|
||||
- Assets must be loaded correctly.
|
||||
- Changes related to networking must be compatible with existing MOHAA clients and servers, these changes must not cause an error/disconnect.
|
||||
- Scripts/mods must remain functional.
|
||||
- The singleplayer campaign must be fully playable.
|
||||
|
||||
### Coding style & Guidelines
|
||||
|
||||
- Match the existing code style in any files you modify.
|
||||
- Avoid personal tags or author comments (.e.g., `// @Name: note`). Git already tracks authorship.
|
||||
- Ensure the code builds successfully using CI.
|
||||
- Use **camelCase** notation for all variables, and **PascalCase** notation for functions. Even if some existing code doesn't.
|
||||
- Format code using `clang-format`.
|
||||
- In VSCode from the command palette: **Format document**
|
||||
|
||||
### Event declaration
|
||||
|
||||
When declaring a new Event, use the following structure:
|
||||
```cpp
|
||||
Event EV_YourEventName // Pascal Case naming convention
|
||||
(
|
||||
"name", // Each parameter on a new line
|
||||
flags,
|
||||
"format specifiers...",
|
||||
"argument names...",
|
||||
"description"
|
||||
);
|
||||
```
|
||||
|
||||
### Code annotations
|
||||
|
||||
When modifying existing code from the original game or adding new classes, annotate your changes using one of the following patterns:
|
||||
|
||||
#### Additions
|
||||
|
||||
```cpp
|
||||
// Added in OPM
|
||||
// Description
|
||||
```
|
||||
|
||||
#### Changes
|
||||
|
||||
```cpp
|
||||
// Changed in OPM
|
||||
// Description
|
||||
```
|
||||
|
||||
#### Fixes
|
||||
|
||||
```cpp
|
||||
// Fixed in OPM
|
||||
// Description
|
||||
```
|
||||
|
||||
#### Removal
|
||||
|
||||
```cpp
|
||||
// Removed in OPM
|
||||
// Description
|
||||
```
|
||||
|
||||
If referencing a specific game version, replace OPM with that version number. Example:
|
||||
```cpp
|
||||
// Added in 2.11
|
||||
// Make sure to clean turret stuff up
|
||||
// when the player is deleted
|
||||
```
|
||||
Known versions are `1.00`, `1.10`, `1.11`, `2.0`, `2.1`, `2.11`, `2.15`, `2.30`, `2.40`.
|
||||
|
||||
You can also group multiple related functions like this:
|
||||
```cpp
|
||||
// Added in OPM
|
||||
//====
|
||||
void Function1();
|
||||
void Function2();
|
||||
void Function3();
|
||||
//====
|
||||
```
|
||||
|
||||
For new source files, include the annotation after the license notice.
|
||||
|
||||
### Source files
|
||||
|
||||
- Always put the license notice as the header of the file (template [here](docs/markdown/05-contributing/01-license-header.md)).
|
||||
- Only `#include` what's necessary.
|
||||
- Each source file should contain related classes and functions.
|
||||
|
||||
---
|
||||
|
||||
## Pull Requests
|
||||
|
||||
Pull Requests are the preferred way of submitting code changes.
|
||||
|
||||
### Before you start
|
||||
|
||||
1. **Discuss major changes first**: open an issue or discuss about it.
|
||||
2. **Create a branch** based on the `main` branch (you shouldn't commit directly on `main`)
|
||||
3. **Keep PRs as small as possible and focused**: One clear purpose per PR.
|
||||
|
||||
### Submitting a PR
|
||||
|
||||
- Target the correct branch (usually `main`).
|
||||
- Add a short and clear description of what you changed and why.
|
||||
- Reference matching issues (e.g. `Fixes #123`).
|
||||
- Make sure your code builds and passes tests.
|
||||
- Test locally to ensure your changes don't break functionality or compatibility.
|
||||
|
||||
### Reviews
|
||||
|
||||
- Maintainers may ask for tweaks or commit changes directly to your PR, that's normal.
|
||||
- Stay polite and technical.
|
||||
- Once approved, your changes will be merged.
|
||||
|
||||
### Additional Notes
|
||||
|
||||
- Contributions follow the same license as the project.
|
||||
- Keep things consistent with existing code and docs.
|
||||
- If you're unsure about anything, you can discuss it on Discord via [this link](https://discord.gg/NYtH58R).
|
||||
@@ -8,87 +8,102 @@
|
||||
|
||||

|
||||
|
||||
## Intro
|
||||
## What is OpenMoHAA?
|
||||
|
||||
The main goal of OpenMoHAA is to ensure the future and continuity of **Medal of Honor: Allied Assault** (including Spearhead and Breakthrough expansions) on all platforms/architectures by providing new patches/features. Thanks to the ioquake3 project and the F.A.K.K SDK, OpenMoHAA has already reached more than half of its goal: an open-source version of MoH:AA (based on version 2.40) that is fully compatible with both the original game and expansions, in terms of network protocol, assets, and scripts. OpenMoHAA is compatible with both MOH:AA servers and clients (Spearhead and Breakthrough included).
|
||||
OpenMoHAA is an open-source project aimed at preserving and enhancing **Medal of Honor: Allied Assault** (including Spearhead and Breakthrough expansions) by providing more features and bugfixes, across modern platforms and architectures.
|
||||
|
||||
Powered by [ioquake3](https://github.com/ioquake/ioq3) and the [F.A.K.K SDK](https://code.idtech.space/ritual/fakk2-sdk), OpenMoHAA provides:
|
||||
- Full compatibility with the original game: assets, scripts and multiplayer
|
||||
- Better support for modern systems
|
||||
- Cross-platform support (Linux, Windows, macOS)
|
||||
- Support for both single-player and multiplayer modes
|
||||
- Includes all fixes from Spearhead 2.15 and Breakthrough 2.40b
|
||||
- More fixes and features, such as bots and a ban system
|
||||
|
||||
*OpenMoHAA is an independent project and is not affiliated with or endorsed by Electronic Arts.*
|
||||
|
||||
## Getting started
|
||||
|
||||
- [Downloading and installing OpenMoHAA](docs/getting_started_installation.md)
|
||||
- [Running OpenMoHAA and using expansion assets](docs/getting_started_running.md)
|
||||
- [Dedicated server configuration](docs/configuration/server.md)
|
||||
- 📦 [Installing OpenMoHAA](docs/markdown/01-intro/01-installation.md)
|
||||
- ▶️ [How to play: Launching the game, expansions & file locations](docs/markdown/02-running/01-running.md)
|
||||
- ❓ [FAQ & Troubleshooting](docs/markdown/02-running/03-faq.md)
|
||||
- 🌐 [Setting up a game server](docs/markdown/02-running/02-running-server.md)
|
||||
|
||||
## Reporting Issues
|
||||
|
||||
> [!NOTE]
|
||||
> OpenMoHAA hasn't hit version 1.0.0 yet. Think of it like a beta build from the golden age of LAN parties. Features are being added, bugs are getting squashed, and more things are being tweaked. Things might change, break, or get even better over time.
|
||||
>
|
||||
> If that sounds like your kind of mission, gear up, frag some bots, and help level up OpenMoHAA!
|
||||
|
||||
If you encounter a bug or a problem, you can do one of the following:
|
||||
- Submit an [issue](https://github.com/openmoh/openmohaa/issues) on GitHub (use the template).
|
||||
- Join the [OpenMoHAA Discord](https://discord.gg/NYtH58R) for a quick help.
|
||||
|
||||
## Additional documentation
|
||||
|
||||
- 📖 [Documentation](https://openmoh.github.io/openmohaa)
|
||||
- ⚙️ [Game settings & configuration](docs/markdown/03-configuration/01-configuration.md)
|
||||
- 📝 [Code & Scripting reference](docs/markdown/04-coding/02-coding.md)
|
||||
- 📜 [Contributing guidelines](CONTRIBUTING.md)
|
||||
|
||||
## Current state
|
||||
|
||||
- 🧰 [List of differences](docs/markdown/01-intro/04-differences.md)
|
||||
|
||||
### Single-player
|
||||
|
||||
The entire single-player campaign should work (Allied Assault, Spearhead and Breakthrough). If you encounter any bug, please create a new [GitHub issue](https://github.com/openmoh/openmohaa/issues) describing them.
|
||||
|
||||
### Multiplayer
|
||||
|
||||
The Multiplayer part is almost fully stable, all game modes including `Tug-of-War` from Medal of Honor: Spearhead, and `Liberation` from Medal of Honor: Breakthrough are implemented and are working as intended. Mods like `Freeze-Tag` are working as well.
|
||||
- Almost fully stable
|
||||
- All official game modes are supported, including those from Spearhead and Breakthrough:
|
||||
- Free-For-All
|
||||
- Team-Deathmatch
|
||||
- Round-based match
|
||||
- Objective match
|
||||
- Tug-of-War (Spearhead)
|
||||
- Liberation (Breakthrough)
|
||||
- Popular mods like **Freeze-Tag** are supported
|
||||
- Built-in bots for offline practice and for testing
|
||||
- 🔧 [Setting up bots](docs/markdown/02-running/01-running.md#Playing-with-bots)
|
||||
|
||||
OpenMoHAA can be used to [host](docs/getting_started_installation.md#server) a mohaa/mohaas/mohaab server and players can use OpenMoHAA to [play](docs/getting_started_installation.md#client) on any server. If some bugs/strange behavior occurs, the best way to report them is by [creating a new issue](https://github.com/openmoh/openmohaa/issues) on the [OpenMoHAA GitHub](https://github.com/openmoh/openmohaa) project with the steps to reproduce (with eventually the problematic mods).
|
||||
|
||||
One of the big multiplayer features are bots. They were introduced for testing and for entertainment purposes so players can have fun alone. See [Configuring bots](docs/configuration/server.md#bots) in the dedicated server configuration documentation to set them up.
|
||||
|
||||
## Features
|
||||
|
||||
- [List of new features](docs/features.md)
|
||||
- [Scripting commands](https://htmlpreview.github.io/?https://github.com/openmoh/openmohaa/blob/main/docs/features_g_allclasses.html)
|
||||
|
||||
## Compiling
|
||||
|
||||
- See [Compiling OpenMoHAA](docs/compiling.md)
|
||||
You can host your own [OpenMoHAA server](docs/markdown/02-running/02-running-server.md#) or join others using OpenMoHAA.
|
||||
|
||||
## Screenshots
|
||||
|
||||
| | |
|
||||
|-----------------------------------------------------------------------------------|----------------------------------------------------------------------------|
|
||||
|  |  |
|
||||
|  |  |
|
||||
|  |  |
|
||||
|  |  |
|
||||
|  |  |
|
||||
|  |  |
|
||||
|
||||
*More screenshots [here](docs/images)*
|
||||
*More screenshots [here](docs/assets/images)*
|
||||
|
||||
## Third party
|
||||
## Development & Compiling
|
||||
|
||||
### SDL
|
||||
- 💻 [Building from source](docs/markdown/04-coding/01-compiling.md)
|
||||
|
||||
http://www.libsdl.org/
|
||||
## Third party librairies
|
||||
|
||||
### OpenAL
|
||||
The following third party tools and libraries are used by the project
|
||||
|
||||
https://www.openal.org/
|
||||
- [Flex](https://github.com/westes/flex)
|
||||
- [Bison](https://savannah.gnu.org/projects/bison/)
|
||||
- [SDL](http://www.libsdl.org/)
|
||||
- [OpenAL](https://www.openal.org/)
|
||||
- [LibMAD](http://www.underbit.com/products/mad/)
|
||||
- [cURL](https://curl.se/)
|
||||
- [Libogg](https://github.com/gcp/libogg)
|
||||
- [Libvorbis](https://xiph.org/vorbis/)
|
||||
- [Libopus](https://opus-codec.org/)
|
||||
|
||||
### LibMAD
|
||||
## Resources
|
||||
|
||||
http://www.underbit.com/products/mad/
|
||||
|
||||
### cURL
|
||||
|
||||
https://curl.se/
|
||||
|
||||
### Libogg
|
||||
|
||||
https://github.com/gcp/libogg
|
||||
|
||||
### Libvorbis
|
||||
|
||||
https://xiph.org/vorbis/
|
||||
|
||||
### Libopus
|
||||
|
||||
https://opus-codec.org/
|
||||
|
||||
## Communities
|
||||
|
||||
### URLs
|
||||
|
||||
- https://github.com/openmoh/openmohaa/
|
||||
- https://mohaaaa.co.uk/AAAAMOHAA/index.php
|
||||
- https://x-null.net/
|
||||
|
||||
### Discord
|
||||
|
||||
[](https://discord.gg/NYtH58R)
|
||||
- 🔗 [GitHub Repository](https://github.com/openmoh/openmohaa/)
|
||||
- 🌐 [MOH-DB](https://www.moh-db.com/)
|
||||
- 🕹️ [333networks](https://333networks.com/)
|
||||
- 📂 [ModDB](https://www.moddb.com/games/medal-of-honor-allied-assault)
|
||||
- 📂 [GameBanana](https://gamebanana.com/games/720)
|
||||
- 💬 [Join us on Discord](https://discord.gg/NYtH58R)
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@MACOS_APP_EXECUTABLE_NAME@</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>@MACOS_APP_ICON_FILE@</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>@MACOS_APP_GUI_IDENTIFIER@</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>@MACOS_APP_BUNDLE_NAME@</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@MACOS_APP_SHORT_VERSION_STRING@</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@MACOS_APP_BUNDLE_VERSION@</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>@MACOS_APP_COPYRIGHT@</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>@MACOS_APP_DEPLOYMENT_TARGET@</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.games</string>
|
||||
|
||||
@MACOS_APP_PLIST_URL_TYPES@
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,107 @@
|
||||
if(NOT BUILD_GAME_LIBRARIES AND NOT BUILD_GAME_QVMS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(utils/set_output_dirs)
|
||||
include(shared_script)
|
||||
|
||||
file(GLOB_RECURSE BG_SOURCES
|
||||
${SOURCE_DIR}/fgame/bg_misc.cpp
|
||||
${SOURCE_DIR}/fgame/bg_pmove.cpp
|
||||
${SOURCE_DIR}/fgame/bg_slidemove.cpp
|
||||
${SOURCE_DIR}/fgame/bg_voteoptions.cpp
|
||||
)
|
||||
|
||||
file(GLOB_RECURSE CGAME_SOURCES
|
||||
${SOURCE_DIR}/cgame/*.c ${SOURCE_DIR}/cgame/*.cpp
|
||||
)
|
||||
|
||||
set(CGAME_BINARY_SOURCES)
|
||||
set(CGAME_QVM_SOURCES)
|
||||
|
||||
file(GLOB_RECURSE GAME_SOURCES
|
||||
${SOURCE_DIR}/fgame/*.c ${SOURCE_DIR}/fgame/*.cpp
|
||||
${SOURCE_DIR}/script/*.c ${SOURCE_DIR}/script/*.cpp
|
||||
${SOURCE_DIR}/parser/parsetree.cpp
|
||||
)
|
||||
|
||||
# Compile lexer and grammar files
|
||||
|
||||
if (FLEX_FOUND)
|
||||
flex_target(fgame-lexer ${CMAKE_SOURCE_DIR}/code/parser/lex_source.txt ${CMAKE_SOURCE_DIR}/code/parser/generated/yyLexer.cpp DEFINES_FILE ${CMAKE_SOURCE_DIR}/code/parser/generated/yyLexer.h COMPILE_FLAGS "-Cem --nounistd")
|
||||
endif()
|
||||
|
||||
if (BISON_FOUND)
|
||||
bison_target(fgame-parser ${CMAKE_SOURCE_DIR}/code/parser/bison_source.txt ${CMAKE_SOURCE_DIR}/code/parser/generated/yyParser.cpp)
|
||||
endif()
|
||||
|
||||
file(MAKE_DIRECTORY "${CMAKE_SOURCE_DIR}/code/parser/generated")
|
||||
|
||||
list(APPEND GAME_SOURCES
|
||||
${BISON_fgame-parser_OUTPUTS}
|
||||
${FLEX_fgame-lexer_OUTPUTS}
|
||||
)
|
||||
|
||||
set(GAME_BINARY_SOURCES)
|
||||
set(GAME_QVM_SOURCES)
|
||||
|
||||
set(UI_SOURCES)
|
||||
|
||||
set(UI_BINARY_SOURCES)
|
||||
set(UI_QVM_SOURCES)
|
||||
|
||||
set(GAME_MODULE_SHARED_SOURCES
|
||||
${SOURCE_DIR}/qcommon/q_math.c
|
||||
${SOURCE_DIR}/qcommon/q_shared.c
|
||||
${SCRIPT_SYSTEM_SOURCES}
|
||||
)
|
||||
|
||||
set(CGAME_SOURCES_BASEGAME ${CGAME_SOURCES} ${GAME_MODULE_SHARED_SOURCES})
|
||||
set(GAME_SOURCES_BASEGAME ${GAME_SOURCES} ${GAME_MODULE_SHARED_SOURCES})
|
||||
set(UI_SOURCES_BASEGAME ${UI_SOURCES} ${GAME_MODULE_SHARED_SOURCES})
|
||||
|
||||
if(BUILD_GAME_LIBRARIES)
|
||||
set(CGAME_MODULE_BINARY ${CGAME_MODULE})
|
||||
set(GAME_MODULE_BINARY ${GAME_MODULE})
|
||||
set(UI_MODULE_BINARY ${UI_MODULE})
|
||||
|
||||
if (BASEGAME)
|
||||
set(CGAME_MODULE_BINARY_BASEGAME ${CGAME_MODULE_BINARY}_${BASEGAME})
|
||||
set(GAME_MODULE_BINARY_BASEGAME ${GAME_MODULE_BINARY}_${BASEGAME})
|
||||
set(UI_MODULE_BINARY_BASEGAME ${UI_MODULE_BINARY}_${BASEGAME})
|
||||
else()
|
||||
set(CGAME_MODULE_BINARY_BASEGAME ${CGAME_MODULE_BINARY})
|
||||
set(GAME_MODULE_BINARY_BASEGAME ${GAME_MODULE_BINARY})
|
||||
set(UI_MODULE_BINARY_BASEGAME ${UI_MODULE_BINARY})
|
||||
endif()
|
||||
|
||||
add_library( ${CGAME_MODULE_BINARY_BASEGAME} SHARED ${CGAME_SOURCES_BASEGAME} ${BG_SOURCES} ${CGAME_BINARY_SOURCES})
|
||||
target_compile_definitions( ${CGAME_MODULE_BINARY_BASEGAME} PRIVATE CGAME_DLL)
|
||||
target_link_libraries( ${CGAME_MODULE_BINARY_BASEGAME} PRIVATE ${COMMON_LIBRARIES})
|
||||
set_target_properties( ${CGAME_MODULE_BINARY_BASEGAME} PROPERTIES OUTPUT_NAME ${CGAME_MODULE_BINARY})
|
||||
set_output_dirs( ${CGAME_MODULE_BINARY_BASEGAME} SUBDIRECTORY ${BASEGAME})
|
||||
|
||||
INSTALL(TARGETS ${CGAME_MODULE_BINARY_BASEGAME} DESTINATION ${INSTALL_LIBDIR_FULL})
|
||||
|
||||
if(MSVC)
|
||||
INSTALL(FILES $<TARGET_PDB_FILE:${CGAME_MODULE_BINARY_BASEGAME}> DESTINATION ${INSTALL_LIBDIR_FULL} OPTIONAL)
|
||||
endif()
|
||||
|
||||
add_library( ${GAME_MODULE_BINARY_BASEGAME} SHARED ${GAME_SOURCES_BASEGAME} ${BG_SOURCES} ${GAME_BINARY_SOURCES})
|
||||
target_compile_definitions( ${GAME_MODULE_BINARY_BASEGAME} PRIVATE GAME_DLL WITH_SCRIPT_ENGINE ARCHIVE_SUPPORTED)
|
||||
target_link_libraries( ${GAME_MODULE_BINARY_BASEGAME} PRIVATE RecastNavigation::Detour RecastNavigation::DetourCrowd RecastNavigation::Recast)
|
||||
target_link_libraries( ${GAME_MODULE_BINARY_BASEGAME} PRIVATE ${COMMON_LIBRARIES})
|
||||
set_target_properties( ${GAME_MODULE_BINARY_BASEGAME} PROPERTIES OUTPUT_NAME ${GAME_MODULE_BINARY})
|
||||
set_output_dirs( ${GAME_MODULE_BINARY_BASEGAME} SUBDIRECTORY ${BASEGAME})
|
||||
|
||||
INSTALL(TARGETS ${GAME_MODULE_BINARY_BASEGAME} DESTINATION ${INSTALL_LIBDIR_FULL})
|
||||
|
||||
if(MSVC)
|
||||
INSTALL(FILES $<TARGET_PDB_FILE:${GAME_MODULE_BINARY_BASEGAME}> DESTINATION ${INSTALL_LIBDIR_FULL} OPTIONAL)
|
||||
endif()
|
||||
|
||||
#add_library( ${UI_MODULE_BINARY_BASEGAME} SHARED ${UI_SOURCES_BASEGAME} ${UI_BINARY_SOURCES})
|
||||
#target_compile_definitions( ${UI_MODULE_BINARY_BASEGAME} PRIVATE UI)
|
||||
#set_target_properties( ${UI_MODULE_BINARY_BASEGAME} PROPERTIES OUTPUT_NAME ${UI_MODULE_BINARY})
|
||||
#set_output_dirs( ${UI_MODULE_BINARY_BASEGAME} SUBDIRECTORY ${BASEGAME})
|
||||
endif()
|
||||
@@ -0,0 +1,150 @@
|
||||
if(NOT BUILD_CLIENT)
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(utils/add_git_dependency)
|
||||
include(utils/set_output_dirs)
|
||||
include(shared_sources)
|
||||
include(shared_script)
|
||||
|
||||
include(renderer_common)
|
||||
|
||||
set(CLIENT_SOURCES
|
||||
${SOURCE_DIR}/client/cl_avi.cpp
|
||||
${SOURCE_DIR}/client/cl_cgame.cpp
|
||||
${SOURCE_DIR}/client/cl_cin.cpp
|
||||
${SOURCE_DIR}/client/cl_consolecmds.cpp
|
||||
${SOURCE_DIR}/client/cl_curl.c
|
||||
${SOURCE_DIR}/client/cl_input.cpp
|
||||
${SOURCE_DIR}/client/cl_instantAction.cpp
|
||||
${SOURCE_DIR}/client/cl_inv.cpp
|
||||
${SOURCE_DIR}/client/cl_invrender.cpp
|
||||
${SOURCE_DIR}/client/cl_keys.cpp
|
||||
${SOURCE_DIR}/client/cl_main.cpp
|
||||
${SOURCE_DIR}/client/cl_net_chan.cpp
|
||||
${SOURCE_DIR}/client/cl_parse.cpp
|
||||
${SOURCE_DIR}/client/cl_scrn.cpp
|
||||
${SOURCE_DIR}/client/cl_ui.cpp
|
||||
${SOURCE_DIR}/client/cl_uibind.cpp
|
||||
${SOURCE_DIR}/client/cl_uidmbox.cpp
|
||||
${SOURCE_DIR}/client/cl_uifilepicker.cpp
|
||||
${SOURCE_DIR}/client/cl_uigamespy.cpp
|
||||
${SOURCE_DIR}/client/cl_uigmbox.cpp
|
||||
${SOURCE_DIR}/client/cl_uilangame.cpp
|
||||
${SOURCE_DIR}/client/cl_uiloadsave.cpp
|
||||
${SOURCE_DIR}/client/cl_uimaprotationsetup.cpp
|
||||
${SOURCE_DIR}/client/cl_uimaprunner.cpp
|
||||
${SOURCE_DIR}/client/cl_uiminicon.cpp
|
||||
${SOURCE_DIR}/client/cl_uimpmappicker.cpp
|
||||
${SOURCE_DIR}/client/cl_uiplayermodelpicker.cpp
|
||||
${SOURCE_DIR}/client/cl_uiradar.cpp
|
||||
${SOURCE_DIR}/client/cl_uiserverlist.cpp
|
||||
${SOURCE_DIR}/client/cl_uisoundpicker.cpp
|
||||
${SOURCE_DIR}/client/cl_uistd.cpp
|
||||
${SOURCE_DIR}/client/cl_uiview3d.cpp
|
||||
${SOURCE_DIR}/client/libmumblelink.c
|
||||
${SOURCE_DIR}/client/qal.c
|
||||
${SOURCE_DIR}/client/snd_codec_mp3.c
|
||||
${SOURCE_DIR}/client/snd_codec_ogg.c
|
||||
${SOURCE_DIR}/client/snd_codec_opus.c
|
||||
${SOURCE_DIR}/client/snd_codec_wav.c
|
||||
${SOURCE_DIR}/client/snd_codec.c
|
||||
${SOURCE_DIR}/client/snd_dma_new.cpp
|
||||
${SOURCE_DIR}/client/snd_info.cpp
|
||||
${SOURCE_DIR}/client/snd_mem_new.cpp
|
||||
${SOURCE_DIR}/client/snd_miles_new.cpp
|
||||
${SOURCE_DIR}/client/snd_openal_new.cpp
|
||||
${SOURCE_DIR}/client/usignal.cpp
|
||||
${SOURCE_DIR}/sdl/sdl_input.c
|
||||
${SOURCE_DIR}/sdl/sdl_mouse.c
|
||||
${CLIENT_PLATFORM_SOURCES}
|
||||
)
|
||||
|
||||
# Gamespy
|
||||
list(APPEND CLIENT_SOURCES
|
||||
${SOURCE_DIR}/gamespy/cl_gamespy.c
|
||||
)
|
||||
|
||||
file(GLOB_RECURSE UI_SOURCES "${SOURCE_DIR}/uilib/*.c" "${SOURCE_DIR}/uilib/*.cpp")
|
||||
|
||||
add_git_dependency(${SOURCE_DIR}/client/cl_console.c)
|
||||
|
||||
set(CLIENT_BINARY ${CLIENT_NAME})
|
||||
|
||||
list(APPEND CLIENT_DEFINITIONS BOTLIB)
|
||||
list(APPEND CLIENT_DEFINITIONS APP_MODULE)
|
||||
|
||||
if(BUILD_STANDALONE)
|
||||
list(APPEND CLIENT_DEFINITIONS STANDALONE)
|
||||
endif()
|
||||
|
||||
if(USE_RENDERER_DLOPEN)
|
||||
list(APPEND CLIENT_DEFINITIONS USE_RENDERER_DLOPEN)
|
||||
endif()
|
||||
|
||||
if(USE_HTTP)
|
||||
list(APPEND CLIENT_DEFINITIONS USE_HTTP)
|
||||
endif()
|
||||
|
||||
if(USE_VOIP)
|
||||
list(APPEND CLIENT_DEFINITIONS USE_VOIP)
|
||||
endif()
|
||||
|
||||
if(USE_MUMBLE)
|
||||
list(APPEND CLIENT_DEFINITIONS USE_MUMBLE)
|
||||
list(APPEND CLIENT_LIBRARY_SOURCES ${SOURCE_DIR}/client/libmumblelink.c)
|
||||
endif()
|
||||
|
||||
list(APPEND CLIENT_BINARY_SOURCES
|
||||
${SERVER_SOURCES}
|
||||
${CLIENT_SOURCES}
|
||||
${UI_SOURCES}
|
||||
${COMMON_SOURCES}
|
||||
${SCRIPT_SYSTEM_SOURCES}
|
||||
${BOTLIB_SOURCES}
|
||||
${SYSTEM_SOURCES}
|
||||
${ASM_SOURCES}
|
||||
${CLIENT_LIBRARY_SOURCES})
|
||||
|
||||
add_executable(${CLIENT_BINARY} ${CLIENT_EXECUTABLE_OPTIONS} ${CLIENT_BINARY_SOURCES})
|
||||
|
||||
target_include_directories( ${CLIENT_BINARY} PRIVATE ${CLIENT_INCLUDE_DIRS})
|
||||
target_include_directories( ${CLIENT_BINARY} PRIVATE ${SOURCE_DIR}/client)
|
||||
target_compile_definitions( ${CLIENT_BINARY} PRIVATE ${CLIENT_DEFINITIONS})
|
||||
target_compile_options( ${CLIENT_BINARY} PRIVATE ${CLIENT_COMPILE_OPTIONS})
|
||||
target_link_libraries( ${CLIENT_BINARY} PRIVATE ${COMMON_LIBRARIES} ${CLIENT_LIBRARIES})
|
||||
target_link_options( ${CLIENT_BINARY} PRIVATE ${CLIENT_LINK_OPTIONS})
|
||||
|
||||
set_output_dirs(${CLIENT_BINARY})
|
||||
|
||||
if(NOT USE_RENDERER_DLOPEN)
|
||||
target_sources(${CLIENT_BINARY} PRIVATE
|
||||
# These are never simultaneously populated
|
||||
${RENDERER_GL1_BINARY_SOURCES}
|
||||
${RENDERER_GL2_BINARY_SOURCES})
|
||||
|
||||
target_include_directories( ${CLIENT_BINARY} PRIVATE ${RENDERER_INCLUDE_DIRS})
|
||||
target_compile_definitions( ${CLIENT_BINARY} PRIVATE ${RENDERER_DEFINITIONS})
|
||||
target_compile_options( ${CLIENT_BINARY} PRIVATE ${RENDERER_COMPILE_OPTIONS})
|
||||
target_link_libraries( ${CLIENT_BINARY} PRIVATE ${RENDERER_LIBRARIES})
|
||||
endif()
|
||||
|
||||
foreach(LIBRARY IN LISTS CLIENT_DEPLOY_LIBRARIES)
|
||||
add_custom_command(TARGET ${CLIENT_BINARY} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${LIBRARY}
|
||||
$<TARGET_FILE_DIR:${CLIENT_BINARY}>)
|
||||
|
||||
install(FILES ${LIBRARY} DESTINATION
|
||||
# install() requires a relative path hence:
|
||||
$<PATH:RELATIVE_PATH,$<TARGET_FILE_DIR:${CLIENT_BINARY}>,${CMAKE_BINARY_DIR}/$<CONFIG>>)
|
||||
endforeach()
|
||||
|
||||
set_target_properties(${CLIENT_BINARY} PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
|
||||
|
||||
INSTALL(TARGETS ${CLIENT_BINARY} DESTINATION ${INSTALL_BINDIR_FULL})
|
||||
|
||||
if (MSVC)
|
||||
target_link_options(${CLIENT_BINARY} PRIVATE "/MANIFEST:NO")
|
||||
INSTALL(FILES $<TARGET_PDB_FILE:${CLIENT_BINARY}> DESTINATION ${INSTALL_BINDIR_FULL} OPTIONAL)
|
||||
endif()
|
||||
@@ -0,0 +1,21 @@
|
||||
include(compilers/appleclang)
|
||||
include(compilers/clang)
|
||||
include(compilers/gcc)
|
||||
include(compilers/gnu)
|
||||
include(compilers/msvc)
|
||||
|
||||
set(CMAKE_DEBUG_POSTFIX "-dbg")
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
add_compile_definitions(_DEBUG)
|
||||
|
||||
# NOTE: The following may mess up function importation
|
||||
#if(UNIX)
|
||||
# # Enable all exports so all functions name can be seen during executable crash
|
||||
# set(CMAKE_ENABLE_EXPORTS ON)
|
||||
# message(STATUS "Enabling exports on Unix for backtrace")
|
||||
#endif()
|
||||
else()
|
||||
# Non-debug builds
|
||||
add_compile_definitions(NDEBUG)
|
||||
endif()
|
||||
@@ -0,0 +1,15 @@
|
||||
# Apple Clang compiler specific settings
|
||||
|
||||
if(NOT CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(CMAKE_INSTALL_RPATH "@executable_path")
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
|
||||
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
# Set the visibility to hidden on macOS to prevent shared libraries from
|
||||
# using functions in the executable
|
||||
# it's ok to hide them because the backtrace on macOS will still print the name of the functions
|
||||
add_compile_options(-fvisibility=hidden)
|
||||
endif()
|
||||
@@ -0,0 +1,8 @@
|
||||
# Clang compiler specific settings
|
||||
|
||||
if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Ignore warnings for code like 'assert("Assert string")'
|
||||
add_compile_options(-Wno-pointer-bool-conversion)
|
||||
@@ -0,0 +1,10 @@
|
||||
# GCC compiler specific settings
|
||||
|
||||
if(NOT CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Add this option on gcc to prevent functions from having the STB_GNU_UNIQUE binding
|
||||
# Otherwise, it would prevent libraries from being unloaded
|
||||
# which will cause undefined behavior and crashes due to memory corruption
|
||||
add_compile_options(-fno-gnu-unique)
|
||||
@@ -0,0 +1,50 @@
|
||||
# GNU style (GCC/Clang) compiler specific settings
|
||||
|
||||
if(NOT CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_ID MATCHES "^(Apple)?Clang$")
|
||||
return()
|
||||
endif()
|
||||
|
||||
enable_language(ASM)
|
||||
|
||||
set(ASM_SOURCES
|
||||
${SOURCE_DIR}/asm/ftola.c
|
||||
${SOURCE_DIR}/asm/snapvector.c
|
||||
)
|
||||
|
||||
add_compile_options(-Wall -Wimplicit -Wshadow
|
||||
-Wstrict-prototypes -Wformat=2 -Wformat-security
|
||||
-Wstrict-aliasing=2 -Wmissing-format-attribute
|
||||
-Wdisabled-optimization -Werror-implicit-function-declaration)
|
||||
|
||||
add_compile_options(-Wno-format-zero-length -Wno-format-nonliteral)
|
||||
|
||||
# There are lots of instances of union based aliasing in the code
|
||||
# that rely on the compiler not optimising them away, so disable it
|
||||
add_compile_options(-fno-strict-aliasing)
|
||||
|
||||
# This is necessary to hide all symbols unless explicitly exported
|
||||
# via the Q_EXPORT macro
|
||||
#add_compile_options(-fvisibility=hidden)
|
||||
|
||||
add_compile_options(-Wno-comment)
|
||||
# Treat no return type as error
|
||||
add_compile_options(-Werror=return-type)
|
||||
|
||||
set(ASM_SOURCES)
|
||||
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -v
|
||||
OUTPUT_VARIABLE COMPILER_OUTPUT
|
||||
ERROR_VARIABLE COMPILER_OUTPUT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
list(APPEND CLIENT_LIBRARIES m)
|
||||
list(APPEND SERVER_LIBRARIES m)
|
||||
|
||||
if(COMPILER_OUTPUT MATCHES "musl|freebsd|openbsd|netbsd")
|
||||
list(APPEND CLIENT_LIBRARIES execinfo)
|
||||
list(APPEND SERVER_LIBRARIES execinfo)
|
||||
elseif (NOT APPLE)
|
||||
# For when using GLIBC versions older than 2.34
|
||||
list(APPEND CLIENT_LIBRARIES rt)
|
||||
list(APPEND SERVER_LIBRARIES rt)
|
||||
endif()
|
||||
@@ -0,0 +1,55 @@
|
||||
# MSVC compiler specific settings
|
||||
|
||||
if(NOT CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(utils/arch)
|
||||
|
||||
#enable_language(ASM_MASM)
|
||||
|
||||
set(ASM_SOURCES
|
||||
${SOURCE_DIR}/asm/snapvector.asm
|
||||
${SOURCE_DIR}/asm/ftola.asm
|
||||
)
|
||||
|
||||
if(ARCH MATCHES "x86_64")
|
||||
list(APPEND ASM_SOURCES ${SOURCE_DIR}/asm/vm_x86_64.asm)
|
||||
set_source_files_properties(
|
||||
${ASM_SOURCES}
|
||||
PROPERTIES COMPILE_DEFINITIONS "idx64")
|
||||
endif()
|
||||
|
||||
# Baseline warnings
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:C>:/W4>")
|
||||
|
||||
# C4267: 'var' : conversion from 'size_t' to 'type', possible loss of data
|
||||
# There are way too many of these to realistically deal with them
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:C>:/wd4267>")
|
||||
|
||||
# C4206: nonstandard extension used: translation unit is empty
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:C>:/wd4206>")
|
||||
|
||||
# C4324: 'struct': structure was padded due to alignment specifier
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:C>:/wd4324>")
|
||||
|
||||
# C4200: nonstandard extension used: zero-sized array in struct/union
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:C>:/wd4200>")
|
||||
|
||||
# MSVC doesn't understand __inline__, which libjpeg uses
|
||||
add_compile_definitions(__inline__=inline)
|
||||
|
||||
# It's unlikely that we'll move to the _s variants, so stop the warning
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
|
||||
# The sockets platform abstraction layer necessarily uses deprecated APIs
|
||||
add_compile_definitions(_WINSOCK_DEPRECATED_NO_WARNINGS)
|
||||
|
||||
#
|
||||
# Microsoft compiler specific parameters
|
||||
#
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
add_compile_definitions(_CRT_NONSTDC_NO_DEPRECATE)
|
||||
|
||||
# Treat no return type as error
|
||||
add_compile_options(/we4715)
|
||||
@@ -0,0 +1 @@
|
||||
include(deploy/unix)
|
||||
@@ -0,0 +1,28 @@
|
||||
|
||||
if(NOT APPLE)
|
||||
# Configure the .desktop entries with the arch suffix
|
||||
configure_file(
|
||||
misc/linux/org.openmoh.openmohaa.desktop.in
|
||||
${CMAKE_BINARY_DIR}/misc/linux/org.openmoh.openmohaa.desktop
|
||||
@ONLY
|
||||
)
|
||||
configure_file(
|
||||
misc/linux/org.openmoh.openmohaab.desktop.in
|
||||
${CMAKE_BINARY_DIR}/misc/linux/org.openmoh.openmohaab.desktop
|
||||
@ONLY
|
||||
)
|
||||
configure_file(
|
||||
misc/linux/org.openmoh.openmohaas.desktop.in
|
||||
${CMAKE_BINARY_DIR}/misc/linux/org.openmoh.openmohaas.desktop
|
||||
@ONLY
|
||||
)
|
||||
|
||||
# Install .desktop entries
|
||||
install(FILES ${CMAKE_BINARY_DIR}/misc/linux/org.openmoh.openmohaa.desktop DESTINATION ${INSTALL_DATADIR_FULL}/applications)
|
||||
install(FILES ${CMAKE_BINARY_DIR}/misc/linux/org.openmoh.openmohaab.desktop DESTINATION ${INSTALL_DATADIR_FULL}/applications)
|
||||
install(FILES ${CMAKE_BINARY_DIR}/misc/linux/org.openmoh.openmohaas.desktop DESTINATION ${INSTALL_DATADIR_FULL}/applications)
|
||||
|
||||
install(FILES misc/linux/org.openmoh.openmohaa.metainfo.xml DESTINATION ${INSTALL_DATADIR_FULL}/metainfo)
|
||||
|
||||
install(FILES misc/openmohaa.svg DESTINATION ${INSTALL_DATADIR_FULL}/icons/hicolor/symbolic/apps/ RENAME org.openmoh.openmohaa.svg)
|
||||
endif()
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
|
||||
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,62 @@
|
||||
include_directories(${SOURCE_DIR}/gamespy/common)
|
||||
include_directories(${SOURCE_DIR}/gamespy/gcdkey)
|
||||
|
||||
file(GLOB SRCS_common
|
||||
${SOURCE_DIR}/gamespy/common/*.c
|
||||
${SOURCE_DIR}/gamespy/darray.c
|
||||
${SOURCE_DIR}/gamespy/gserver.c
|
||||
${SOURCE_DIR}/gamespy/gserverlist.c
|
||||
${SOURCE_DIR}/gamespy/hashtable.c
|
||||
${SOURCE_DIR}/gamespy/md5c.c
|
||||
${SOURCE_DIR}/gamespy/gutil.c
|
||||
)
|
||||
|
||||
file(GLOB SRCS_gcdkey
|
||||
${SOURCE_DIR}/gamespy/gcdkey/*.c
|
||||
)
|
||||
|
||||
file(GLOB SRCS_natneg
|
||||
${SOURCE_DIR}/gamespy/natneg/*.c
|
||||
)
|
||||
|
||||
file(GLOB SRCS_qr2
|
||||
${SOURCE_DIR}/gamespy/qr2/*.c
|
||||
)
|
||||
|
||||
add_library(gcd_common STATIC ${SRCS_common})
|
||||
add_library(gcd_key STATIC ${SRCS_gcdkey})
|
||||
add_library(gcd_natneg STATIC ${SRCS_natneg})
|
||||
add_library(gcd_qr2 STATIC ${SRCS_qr2})
|
||||
add_library(gcd INTERFACE)
|
||||
|
||||
set_property(TARGET gcd_common gcd_key PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
if(UNIX)
|
||||
add_definitions(-D_LINUX=1)
|
||||
endif()
|
||||
|
||||
set(DEPENDENT_LIBS
|
||||
gcd_key
|
||||
# gcd_gp
|
||||
# gcd_gstats
|
||||
gcd_natneg
|
||||
# gcd_pinger
|
||||
# gcd_pt
|
||||
gcd_qr2
|
||||
# gcd_sake
|
||||
# gcd_sc
|
||||
# gcd_serverbrowsing
|
||||
# gcd_webservices
|
||||
)
|
||||
|
||||
target_link_libraries(gcd INTERFACE ${DEPENDENT_LIBS})
|
||||
|
||||
foreach(LIB ${DEPENDENT_LIBS})
|
||||
target_link_libraries(${LIB} PUBLIC gcd_common)
|
||||
endforeach()
|
||||
|
||||
target_link_libraries(gcd_key PRIVATE gcd_qr2)
|
||||
target_link_libraries(gcd_qr2 PRIVATE gcd_natneg)
|
||||
|
||||
list(APPEND CLIENT_LIBRARIES gcd)
|
||||
list(APPEND SERVER_LIBRARIES gcd)
|
||||
@@ -0,0 +1,21 @@
|
||||
set(PROJECT_NAME openmohaa)
|
||||
set(PROJECT_VERSION 0.83.0)
|
||||
|
||||
set(SERVER_NAME omohaaded)
|
||||
set(CLIENT_NAME openmohaa)
|
||||
|
||||
set(BASEGAME)
|
||||
|
||||
set(CGAME_MODULE cgame)
|
||||
set(GAME_MODULE game)
|
||||
set(UI_MODULE ui)
|
||||
|
||||
set(WINDOWS_ICON_PATH ${CMAKE_SOURCE_DIR}/misc/windows/openmohaa.ico)
|
||||
|
||||
set(MACOS_ICON_PATH ${CMAKE_SOURCE_DIR}/misc/macos/openmohaa.icns)
|
||||
set(MACOS_BUNDLE_ID org.openmohaa.${CLIENT_NAME})
|
||||
|
||||
set(COPYRIGHT "OpenMoHAA Copyright © 2025 OpenMoHAA Team, Inc. All rights reserved.")
|
||||
|
||||
set(CONTACT_EMAIL "")
|
||||
set(PROTOCOL_HANDLER_SCHEME openmohaa)
|
||||
@@ -0,0 +1,30 @@
|
||||
get_directory_property(INSTALL_TARGETS DIRECTORY
|
||||
${CMAKE_SOURCE_DIR} BUILDSYSTEM_TARGETS)
|
||||
|
||||
# Iterate over all the targets that have an INSTALL_DESTINATION
|
||||
# property (set by set_output_dirs) and call install() on them
|
||||
foreach(TARGET IN LISTS INSTALL_TARGETS)
|
||||
get_target_property(DESTINATION ${TARGET} INSTALL_DESTINATION)
|
||||
if(NOT DESTINATION)
|
||||
continue()
|
||||
endif()
|
||||
|
||||
install(TARGETS ${TARGET}
|
||||
RUNTIME DESTINATION ${DESTINATION}
|
||||
LIBRARY DESTINATION ${DESTINATION}
|
||||
BUNDLE DESTINATION ${DESTINATION}
|
||||
ARCHIVE EXCLUDE_FROM_ALL)
|
||||
endforeach()
|
||||
|
||||
if(NOT CPACK_GENERATOR)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${PROJECT_NAME})
|
||||
set(CPACK_PACKAGE_EXECUTABLES ${CLIENT_NAME} ${PROJECT_NAME})
|
||||
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${PRODUCT_VERSION})
|
||||
set(CPACK_PACKAGE_CONTACT ${CONTACT_EMAIL})
|
||||
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING.txt)
|
||||
|
||||
include(CPack)
|
||||
@@ -1,34 +1,32 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(Launcher)
|
||||
|
||||
set(LAUNCHER_SOURCES "${CMAKE_SOURCE_DIR}/code/Launcher/launch_main.cpp")
|
||||
set(LAUNCHER_SOURCES "${SOURCE_DIR}/Launcher/launch_main.cpp")
|
||||
|
||||
if (WIN32)
|
||||
set(LAUNCHER_SOURCES ${LAUNCHER_SOURCES}
|
||||
"${CMAKE_SOURCE_DIR}/code/Launcher/launch_win32.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/code/sys/win_resource.rc")
|
||||
list(APPEND LAUNCHER_SOURCES
|
||||
${SOURCE_DIR}/Launcher/launch_win32.cpp
|
||||
${SOURCE_DIR}/sys/win_resource.rc
|
||||
)
|
||||
else()
|
||||
set(LAUNCHER_SOURCES ${LAUNCHER_SOURCES}
|
||||
"${CMAKE_SOURCE_DIR}/code/Launcher/launch_linux.cpp")
|
||||
list(APPEND LAUNCHER_SOURCES
|
||||
${SOURCE_DIR}/Launcher/launch_linux.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
function (create_launcher name type)
|
||||
if (NOT BUILD_NO_CLIENT)
|
||||
if (BUILD_CLIENT)
|
||||
add_executable(openmohaa_launcher_${name} ${LAUNCHER_SOURCES})
|
||||
target_include_directories(openmohaa_launcher_${name} PUBLIC "../qcommon")
|
||||
target_compile_definitions(openmohaa_launcher_${name} PRIVATE NO_RC_MANIFEST=1 TARGET_GAME=${type})
|
||||
target_compile_features(openmohaa_launcher_${name} PRIVATE cxx_std_17)
|
||||
set_target_properties(openmohaa_launcher_${name} PROPERTIES OUTPUT_NAME "launch_openmohaa_${name}${TARGET_BIN_SUFFIX}")
|
||||
set_target_properties(openmohaa_launcher_${name} PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
|
||||
|
||||
INSTALL(TARGETS openmohaa_launcher_${name} DESTINATION ${CMAKE_INSTALL_BINDIR}/${BIN_INSTALL_SUBDIR})
|
||||
INSTALL(TARGETS openmohaa_launcher_${name} DESTINATION ${INSTALL_BINDIR_FULL})
|
||||
endif()
|
||||
|
||||
#add_executable(omohaaded_launcher_${name} ${LAUNCHER_SOURCES})
|
||||
#target_include_directories(omohaaded_launcher_${name} PUBLIC "../qcommon")
|
||||
#target_compile_definitions(omohaaded_launcher_${name} PRIVATE NO_RC_MANIFEST=1 TARGET_GAME=${type} DEDICATED=1)
|
||||
#target_compile_features(omohaaded_launcher_${name} PRIVATE cxx_std_17)
|
||||
#set_target_properties(omohaaded_launcher_${name} PROPERTIES OUTPUT_NAME "launch_omohaaded_${name}${TARGET_BIN_SUFFIX}")
|
||||
#set_target_properties(omohaaded_launcher_${name} PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
|
||||
#
|
||||
#INSTALL(TARGETS omohaaded_launcher_${name} DESTINATION ${CMAKE_INSTALL_BINDIR}/${PROJECT_INSTALL_SUBDIR})
|
||||
endfunction()
|
||||
@@ -0,0 +1,12 @@
|
||||
include(libraries/curl)
|
||||
include(libraries/freetype)
|
||||
include(libraries/jpeg)
|
||||
include(libraries/ogg)
|
||||
include(libraries/opus)
|
||||
include(libraries/openal)
|
||||
include(libraries/sdl)
|
||||
include(libraries/vorbis)
|
||||
include(libraries/zlib)
|
||||
include(libraries/libmad)
|
||||
include(libraries/flex_bison)
|
||||
include(libraries/recastnavigation)
|
||||
@@ -0,0 +1,19 @@
|
||||
if(NOT USE_HTTP)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(INTERNAL_CURL_DIR ${SOURCE_DIR}/thirdparty/curl-8.15.0/include)
|
||||
|
||||
find_package(CURL QUIET)
|
||||
|
||||
if(NOT CURL_FOUND)
|
||||
set(CURL_DEFINITIONS USE_INTERNAL_CURL_HEADERS)
|
||||
set(CURL_INCLUDE_DIRS ${INTERNAL_CURL_DIR})
|
||||
endif()
|
||||
|
||||
list(APPEND CLIENT_DEFINITIONS ${CURL_DEFINITIONS})
|
||||
list(APPEND CLIENT_INCLUDE_DIRS ${CURL_INCLUDE_DIRS})
|
||||
|
||||
# For some functions like update checker
|
||||
list(APPEND SERVER_DEFINITIONS ${CURL_DEFINITIONS})
|
||||
list(APPEND SERVER_INCLUDE_DIRS ${CURL_INCLUDE_DIRS})
|
||||
@@ -0,0 +1,18 @@
|
||||
#
|
||||
# Workaround to get a recent version Flex and Bison executables in MacOS
|
||||
# as Bison 2.3 shipped with MacOS doesn't work
|
||||
#
|
||||
if (CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin")
|
||||
execute_process(COMMAND brew --prefix bison RESULT_VARIABLE APP_RESULT OUTPUT_VARIABLE APP_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if (APP_RESULT EQUAL 0 AND EXISTS "${APP_PREFIX}")
|
||||
set(BISON_EXECUTABLE "${APP_PREFIX}/bin/bison")
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND brew --prefix flex RESULT_VARIABLE APP_RESULT OUTPUT_VARIABLE APP_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if (APP_RESULT EQUAL 0 AND EXISTS "${APP_PREFIX}")
|
||||
set(FLEX_EXECUTABLE "${APP_PREFIX}/bin/flex")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(BISON 3 REQUIRED)
|
||||
find_package(FLEX REQUIRED)
|
||||
@@ -0,0 +1,12 @@
|
||||
if(NOT USE_FREETYPE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_RENDERER_GL1 AND NOT BUILD_RENDERER_GL2)
|
||||
return()
|
||||
endif()
|
||||
|
||||
find_package(Freetype REQUIRED)
|
||||
|
||||
list(APPEND RENDERER_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS})
|
||||
list(APPEND RENDERER_LIBRARIES ${FREETYPE_LIBRARIES})
|
||||
@@ -0,0 +1,22 @@
|
||||
if(NOT BUILD_RENDERER_GL1 AND NOT BUILD_RENDERER_GL2)
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(utils/disable_warnings)
|
||||
include(utils/find_include_dirs)
|
||||
|
||||
set(INTERNAL_JPEG_DIR ${SOURCE_DIR}/thirdparty/jpeg-9f)
|
||||
|
||||
if(USE_INTERNAL_JPEG)
|
||||
file(GLOB_RECURSE JPEG_SOURCES ${INTERNAL_JPEG_DIR}/j*.c)
|
||||
disable_warnings(${JPEG_SOURCES})
|
||||
find_include_dirs(JPEG_INCLUDE_DIRS ${INTERNAL_JPEG_DIR})
|
||||
set(JPEG_DEFINITIONS USE_INTERNAL_JPEG)
|
||||
list(APPEND RENDERER_LIBRARY_SOURCES ${JPEG_SOURCES})
|
||||
else()
|
||||
find_package(JPEG REQUIRED)
|
||||
endif()
|
||||
|
||||
list(APPEND RENDERER_LIBRARIES ${JPEG_LIBRARIES})
|
||||
list(APPEND RENDERER_INCLUDE_DIRS ${JPEG_INCLUDE_DIRS})
|
||||
list(APPEND RENDERER_DEFINITIONS ${JPEG_DEFINTIONS})
|
||||
@@ -0,0 +1,33 @@
|
||||
if(NOT USE_CODEC_MAD)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_CLIENT)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(OLD_VALUE ${BUILD_SHARED_LIBS})
|
||||
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
|
||||
|
||||
if(USE_INTERNAL_MAD)
|
||||
add_subdirectory("${SOURCE_DIR}/thirdparty/libmad" "./libmad" EXCLUDE_FROM_ALL)
|
||||
|
||||
list(APPEND CLIENT_LIBRARIES mad)
|
||||
else()
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_path(LIBMAD_INCLUDE_DIRS mad.h)
|
||||
find_library(LIBMAD_LIBRARIES mad)
|
||||
find_package_handle_standard_args(
|
||||
LibMad
|
||||
DEFAULT_MSG
|
||||
LIBMAD_LIBRARIES
|
||||
LIBMAD_INCLUDE_DIRS
|
||||
)
|
||||
|
||||
list(APPEND CLIENT_INCLUDE_DIRS ${LIBMAD_INCLUDE_DIRS})
|
||||
list(APPEND CLIENT_LIBRARIES ${LIBMAD_LIBRARIES})
|
||||
endif()
|
||||
|
||||
set(BUILD_SHARED_LIBS ${OLD_VALUE} CACHE BOOL "" FORCE)
|
||||
|
||||
list(APPEND CLIENT_DEFINITIONS USE_CODEC_MAD=1)
|
||||
@@ -0,0 +1,25 @@
|
||||
if(NOT USE_CODEC_VORBIS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_CLIENT)
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(utils/disable_warnings)
|
||||
|
||||
set(INTERNAL_OGG_DIR ${SOURCE_DIR}/thirdparty/libogg-1.3.6)
|
||||
|
||||
if(USE_INTERNAL_OGG)
|
||||
file(GLOB_RECURSE OGG_SOURCES ${INTERNAL_OGG_DIR}/*.c)
|
||||
disable_warnings(${OGG_SOURCES})
|
||||
set(OGG_INCLUDE_DIRS ${INTERNAL_OGG_DIR}/include)
|
||||
list(APPEND CLIENT_LIBRARY_SOURCES ${OGG_SOURCES})
|
||||
else()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(OGG REQUIRED ogg)
|
||||
endif()
|
||||
|
||||
list(APPEND CLIENT_LIBRARIES ${OGG_LIBRARIES})
|
||||
list(APPEND CLIENT_INCLUDE_DIRS ${OGG_INCLUDE_DIRS})
|
||||
list(APPEND CLIENT_DEFINITIONS ${OGG_DEFINITIONS})
|
||||
@@ -0,0 +1,27 @@
|
||||
if(NOT USE_OPENAL)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_CLIENT)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(INTERNAL_OPENAL_DIR ${SOURCE_DIR}/thirdparty/openal-soft-1.24.3)
|
||||
|
||||
find_package(OpenAL QUIET)
|
||||
|
||||
if(NOT OpenAL_FOUND)
|
||||
set(OPENAL_DEFINITIONS USE_INTERNAL_OPENAL_HEADERS)
|
||||
set(OPENAL_INCLUDE_DIR ${INTERNAL_OPENAL_DIR}/include)
|
||||
set(OPENAL_LIBRARY openal)
|
||||
endif()
|
||||
|
||||
list(APPEND CLIENT_DEFINITIONS ${OPENAL_DEFINITIONS} USE_OPENAL)
|
||||
list(APPEND CLIENT_INCLUDE_DIRS ${OPENAL_INCLUDE_DIR})
|
||||
|
||||
if(USE_OPENAL_DLOPEN)
|
||||
list(APPEND CLIENT_DEFINITIONS USE_OPENAL_DLOPEN)
|
||||
else()
|
||||
find_package(Threads REQUIRED)
|
||||
list(APPEND CLIENT_LIBRARIES Threads::Threads ${OPENAL_LIBRARY})
|
||||
endif()
|
||||
@@ -0,0 +1,31 @@
|
||||
if(NOT USE_CODEC_OPUS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_CLIENT)
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(utils/disable_warnings)
|
||||
include(utils/find_include_dirs)
|
||||
|
||||
set(INTERNAL_OPUS_DIR ${SOURCE_DIR}/thirdparty/opus-1.5.2)
|
||||
set(INTERNAL_OPUSFILE_DIR ${SOURCE_DIR}/thirdparty/opusfile-0.12)
|
||||
|
||||
if(USE_INTERNAL_OPUS)
|
||||
file(GLOB_RECURSE OPUS_SOURCES ${INTERNAL_OPUS_DIR}/*.c)
|
||||
file(GLOB_RECURSE OPUSFILE_SOURCES ${INTERNAL_OPUSFILE_DIR}/*.c)
|
||||
disable_warnings(${OPUS_SOURCES} ${OPUSFILE_SOURCES})
|
||||
find_include_dirs(OPUS_INCLUDE_DIRS ${INTERNAL_OPUS_DIR})
|
||||
find_include_dirs(OPUSFILE_INCLUDE_DIRS ${INTERNAL_OPUSFILE_DIR})
|
||||
set(OPUS_DEFINITIONS OPUS_BUILD HAVE_LRINTF FLOATING_POINT FLOAT_APPROX USE_ALLOCA)
|
||||
list(APPEND CLIENT_LIBRARY_SOURCES ${OPUS_SOURCES} ${OPUSFILE_SOURCES})
|
||||
else()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(OPUS REQUIRED opus)
|
||||
pkg_check_modules(OPUSFILE REQUIRED opusfile)
|
||||
endif()
|
||||
|
||||
list(APPEND CLIENT_LIBRARIES ${OPUS_LIBRARIES} ${OPUSFILE_LIBRARIES})
|
||||
list(APPEND CLIENT_INCLUDE_DIRS ${OPUS_INCLUDE_DIRS} ${OPUSFILE_INCLUDE_DIRS})
|
||||
list(APPEND CLIENT_DEFINITIONS USE_CODEC_OPUS ${OPUS_DEFINITIONS} ${OPUSFILE_DEFINITIONS})
|
||||
@@ -0,0 +1,9 @@
|
||||
# Recast navigation
|
||||
add_subdirectory(${SOURCE_DIR}/thirdparty/recastnavigation/Detour recastnav_detour)
|
||||
add_subdirectory(${SOURCE_DIR}/thirdparty/recastnavigation/DetourCrowd recastnav_crowd)
|
||||
add_subdirectory(${SOURCE_DIR}/thirdparty/recastnavigation/Recast recacstnav_recast)
|
||||
# Enable position independant code on recast navigation libraries.
|
||||
# Otherwise linking will fail relocating some functions on Linux
|
||||
set_property(TARGET Detour DetourCrowd Recast PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
set_target_properties(Detour DetourCrowd Recast PROPERTIES LINKER_LANGUAGE CXX)
|
||||
@@ -0,0 +1,64 @@
|
||||
if(NOT BUILD_CLIENT)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(EMSCRIPTEN)
|
||||
# Emscripten provides its own self contained SDL setup
|
||||
list(APPEND CLIENT_COMPILE_OPTIONS -sUSE_SDL=2)
|
||||
list(APPEND CLIENT_LINK_OPTIONS -sUSE_SDL=2)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(INTERNAL_SDL_DIR ${SOURCE_DIR}/thirdparty/SDL2-2.32.8)
|
||||
|
||||
include(utils/arch)
|
||||
|
||||
if(WIN32 OR APPLE)
|
||||
# On Windows and macOS we have internal SDL binaries we can use
|
||||
set(HAVE_INTERNAL_SDL true)
|
||||
endif()
|
||||
|
||||
if(USE_INTERNAL_SDL AND HAVE_INTERNAL_SDL)
|
||||
set(SDL2_INCLUDE_DIRS ${INTERNAL_SDL_DIR}/include)
|
||||
list(APPEND CLIENT_DEFINITIONS USE_INTERNAL_SDL_HEADERS)
|
||||
list(APPEND RENDERER_DEFINITIONS USE_INTERNAL_SDL_HEADERS)
|
||||
|
||||
if(WIN32)
|
||||
if(ARCH STREQUAL "x86_64")
|
||||
set(LIB_DIR ${SOURCE_DIR}/thirdparty/libs/win64)
|
||||
elseif(ARCH STREQUAL "x86")
|
||||
set(LIB_DIR ${SOURCE_DIR}/thirdparty/libs/win32)
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown ARCH")
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
set(SDL2_LIBRARIES
|
||||
${LIB_DIR}/libSDL2main.a
|
||||
${LIB_DIR}/libSDL2.dll.a)
|
||||
elseif(MSVC)
|
||||
set(SDL2_LIBRARIES
|
||||
${LIB_DIR}/SDL2main.lib
|
||||
${LIB_DIR}/SDL2.lib)
|
||||
endif()
|
||||
|
||||
list(APPEND CLIENT_DEPLOY_LIBRARIES ${LIB_DIR}/SDL2.dll)
|
||||
elseif(APPLE)
|
||||
set(SDL2_LIBRARIES
|
||||
${SOURCE_DIR}/thirdparty/libs/macos/libSDL2main.a
|
||||
${SOURCE_DIR}/thirdparty/libs/macos/libSDL2-2.0.0.dylib)
|
||||
list(APPEND CLIENT_DEPLOY_LIBRARIES
|
||||
${SOURCE_DIR}/thirdparty/libs/macos/libSDL2-2.0.0.dylib)
|
||||
else()
|
||||
message(FATAL_ERROR "HAVE_INTERNAL_SDL set incorrectly; file a bug")
|
||||
endif()
|
||||
else()
|
||||
find_package(SDL2 REQUIRED)
|
||||
endif()
|
||||
|
||||
list(APPEND CLIENT_LIBRARIES ${SDL2_LIBRARIES})
|
||||
list(APPEND CLIENT_INCLUDE_DIRS ${SDL2_INCLUDE_DIRS})
|
||||
list(APPEND CLIENT_COMPILE_OPTIONS ${SDL2_CFLAGS_OTHER})
|
||||
list(APPEND RENDERER_LIBRARIES ${SDL2_LIBRARIES})
|
||||
list(APPEND RENDERER_INCLUDE_DIRS ${SDL2_INCLUDE_DIRS})
|
||||
list(APPEND RENDERER_COMPILE_OPTIONS ${SDL2_CFLAGS_OTHER})
|
||||
@@ -0,0 +1,26 @@
|
||||
if(NOT USE_CODEC_VORBIS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_CLIENT)
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(utils/disable_warnings)
|
||||
|
||||
set(INTERNAL_VORBIS_DIR ${SOURCE_DIR}/thirdparty/libvorbis-1.3.7)
|
||||
|
||||
if(USE_INTERNAL_VORBIS)
|
||||
file(GLOB_RECURSE VORBIS_SOURCES ${INTERNAL_VORBIS_DIR}/*.c)
|
||||
disable_warnings(${VORBIS_SOURCES})
|
||||
set(VORBIS_INCLUDE_DIRS ${INTERNAL_VORBIS_DIR}/include ${INTERNAL_VORBIS_DIR}/lib)
|
||||
list(APPEND CLIENT_LIBRARY_SOURCES ${VORBIS_SOURCES})
|
||||
else()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(VORBIS REQUIRED vorbis)
|
||||
pkg_check_modules(VORBISFILE REQUIRED vorbisfile)
|
||||
endif()
|
||||
|
||||
list(APPEND CLIENT_LIBRARIES ${VORBIS_LIBRARIES} ${VORBISFILE_LIBRARIES})
|
||||
list(APPEND CLIENT_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS} ${VORBISFILE_INCLUDE_DIRS})
|
||||
list(APPEND CLIENT_DEFINITIONS USE_CODEC_VORBIS ${VORBIS_DEFINITIONS} ${VORBISFILE_DEFINITIONS})
|
||||
@@ -0,0 +1,22 @@
|
||||
include(utils/disable_warnings)
|
||||
include(utils/find_include_dirs)
|
||||
|
||||
set(INTERNAL_ZLIB_DIR ${SOURCE_DIR}/thirdparty/zlib-1.3.1)
|
||||
|
||||
if(USE_INTERNAL_ZLIB)
|
||||
file(GLOB_RECURSE ZLIB_SOURCES ${INTERNAL_ZLIB_DIR}/*.c)
|
||||
disable_warnings(${ZLIB_SOURCES})
|
||||
find_include_dirs(ZLIB_INCLUDE_DIRS ${INTERNAL_ZLIB_DIR})
|
||||
set(ZLIB_DEFINITIONS NO_GZIP)
|
||||
list(APPEND SERVER_LIBRARY_SOURCES ${ZLIB_SOURCES})
|
||||
list(APPEND CLIENT_LIBRARY_SOURCES ${ZLIB_SOURCES})
|
||||
else()
|
||||
find_package(ZLIB REQUIRED)
|
||||
endif()
|
||||
|
||||
list(APPEND SERVER_LIBRARIES ${ZLIB_LIBRARIES})
|
||||
list(APPEND SERVER_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS})
|
||||
list(APPEND SERVER_DEFINITIONS ${ZLIB_DEFINITIONS})
|
||||
list(APPEND CLIENT_LIBRARIES ${ZLIB_LIBRARIES})
|
||||
list(APPEND CLIENT_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS})
|
||||
list(APPEND CLIENT_DEFINITIONS ${ZLIB_DEFINITIONS})
|
||||
@@ -0,0 +1,75 @@
|
||||
if(NOT BUILD_GAME_LIBRARIES AND NOT BUILD_GAME_QVMS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(utils/qvm_tools)
|
||||
include(utils/set_output_dirs)
|
||||
|
||||
set(MPCGAME_SOURCES
|
||||
${SOURCE_DIR}/cgame/cg_newdraw.c
|
||||
${SOURCE_DIR}/ui/ui_shared.c
|
||||
)
|
||||
|
||||
set(MPUI_SOURCES
|
||||
${SOURCE_DIR}/ui/ui_main.c
|
||||
${SOURCE_DIR}/ui/ui_atoms.c
|
||||
${SOURCE_DIR}/ui/ui_gameinfo.c
|
||||
${SOURCE_DIR}/ui/ui_players.c
|
||||
${SOURCE_DIR}/ui/ui_shared.c
|
||||
${SOURCE_DIR}/game/bg_misc.c
|
||||
${SOURCE_DIR}/game/bg_lib.c
|
||||
)
|
||||
|
||||
set(MISSIONPACK "missionpack")
|
||||
|
||||
set(CGAME_SOURCES_MISSIONPACK ${CGAME_SOURCES} ${MPCGAME_SOURCES} ${GAME_MODULE_SHARED_SOURCES})
|
||||
set(GAME_SOURCES_MISSIONPACK ${GAME_SOURCES} ${GAME_MODULE_SHARED_SOURCES})
|
||||
set(UI_SOURCES_MISSIONPACK ${MPUI_SOURCES} ${GAME_MODULE_SHARED_SOURCES})
|
||||
|
||||
if(BUILD_GAME_LIBRARIES)
|
||||
set(CGAME_MODULE_BINARY_MISSIONPACK ${CGAME_MODULE_BINARY}_${MISSIONPACK})
|
||||
set(GAME_MODULE_BINARY_MISSIONPACK ${GAME_MODULE_BINARY}_${MISSIONPACK})
|
||||
set(UI_MODULE_BINARY_MISSIONPACK ${UI_MODULE_BINARY}_${MISSIONPACK})
|
||||
|
||||
add_library( ${CGAME_MODULE_BINARY_MISSIONPACK} SHARED ${CGAME_SOURCES_MISSIONPACK} ${CGAME_BINARY_SOURCES})
|
||||
target_compile_definitions( ${CGAME_MODULE_BINARY_MISSIONPACK} PRIVATE CGAME MISSIONPACK)
|
||||
target_link_libraries( ${CGAME_MODULE_BINARY_MISSIONPACK} PRIVATE ${COMMON_LIBRARIES})
|
||||
set_target_properties( ${CGAME_MODULE_BINARY_MISSIONPACK} PROPERTIES OUTPUT_NAME ${CGAME_MODULE_BINARY})
|
||||
set_output_dirs( ${CGAME_MODULE_BINARY_MISSIONPACK} SUBDIRECTORY ${MISSIONPACK})
|
||||
|
||||
add_library( ${GAME_MODULE_BINARY_MISSIONPACK} SHARED ${GAME_SOURCES_MISSIONPACK} ${GAME_BINARY_SOURCES})
|
||||
target_compile_definitions( ${GAME_MODULE_BINARY_MISSIONPACK} PRIVATE QAGAME MISSIONPACK)
|
||||
target_link_libraries( ${GAME_MODULE_BINARY_MISSIONPACK} PRIVATE ${COMMON_LIBRARIES})
|
||||
set_target_properties( ${GAME_MODULE_BINARY_MISSIONPACK} PROPERTIES OUTPUT_NAME ${GAME_MODULE_BINARY})
|
||||
set_output_dirs( ${GAME_MODULE_BINARY_MISSIONPACK} SUBDIRECTORY ${MISSIONPACK})
|
||||
|
||||
add_library( ${UI_MODULE_BINARY_MISSIONPACK} SHARED ${UI_SOURCES_MISSIONPACK} ${UI_BINARY_SOURCES})
|
||||
target_compile_definitions( ${UI_MODULE_BINARY_MISSIONPACK} PRIVATE UI MISSIONPACK)
|
||||
target_link_libraries( ${UI_MODULE_BINARY_MISSIONPACK} PRIVATE ${COMMON_LIBRARIES})
|
||||
set_target_properties( ${UI_MODULE_BINARY_MISSIONPACK} PROPERTIES OUTPUT_NAME ${UI_MODULE_BINARY})
|
||||
set_output_dirs( ${UI_MODULE_BINARY_MISSIONPACK} SUBDIRECTORY ${MISSIONPACK})
|
||||
endif()
|
||||
|
||||
if(BUILD_GAME_QVMS)
|
||||
set(CGAME_MODULE_QVM_MISSIONPACK ${CGAME_MODULE}qvm_${MISSIONPACK})
|
||||
set(GAME_MODULE_QVM_MISSIONPACK ${GAME_MODULE}qvm_${MISSIONPACK})
|
||||
set(UI_MODULE_QVM_MISSIONPACK ${UI_MODULE}qvm_${MISSIONPACK})
|
||||
|
||||
add_qvm(${CGAME_MODULE_QVM_MISSIONPACK}
|
||||
DEFINITIONS CGAME MISSIONPACK
|
||||
OUTPUT_NAME ${CGAME_MODULE}
|
||||
OUTPUT_DIRECTORY ${MISSIONPACK}/vm
|
||||
SOURCES ${CGAME_SOURCES_MISSIONPACK} ${CGAME_QVM_SOURCES})
|
||||
|
||||
add_qvm(${GAME_MODULE_QVM_MISSIONPACK}
|
||||
DEFINITIONS QAGAME MISSIONPACK
|
||||
OUTPUT_NAME ${GAME_MODULE}
|
||||
OUTPUT_DIRECTORY ${MISSIONPACK}/vm
|
||||
SOURCES ${GAME_SOURCES_MISSIONPACK} ${GAME_QVM_SOURCES})
|
||||
|
||||
add_qvm(${UI_MODULE_QVM_MISSIONPACK}
|
||||
DEFINITIONS UI MISSIONPACK
|
||||
OUTPUT_NAME ${UI_MODULE}
|
||||
OUTPUT_DIRECTORY ${MISSIONPACK}/vm
|
||||
SOURCES ${UI_SOURCES_MISSIONPACK} ${UI_QVM_SOURCES})
|
||||
endif()
|
||||
@@ -0,0 +1,20 @@
|
||||
include(platforms/emscripten)
|
||||
include(platforms/linux)
|
||||
include(platforms/macos)
|
||||
include(platforms/unix)
|
||||
include(platforms/windows)
|
||||
|
||||
if(DEBUG_MEMORY)
|
||||
add_definitions(-D_DEBUG_MEM)
|
||||
endif()
|
||||
|
||||
# By default, put both binaries and shared libraries in the same directory
|
||||
# the game uses internal shared libraries that must be in the same folder as the binaries
|
||||
set(CMAKE_INSTALL_BINDIR ${CMAKE_DEFAULT_INSTALL_RUNTIME_DIR} CACHE PATH "Binary dir")
|
||||
set(CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_BINDIR} CACHE PATH "Library dir")
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
cmake_path(SET INSTALL_BINDIR_FULL NORMALIZE "${CMAKE_INSTALL_BINDIR}/${BIN_INSTALL_SUBDIR}")
|
||||
cmake_path(SET INSTALL_LIBDIR_FULL NORMALIZE "${CMAKE_INSTALL_LIBDIR}/${LIB_INSTALL_SUBDIR}")
|
||||
cmake_path(SET INSTALL_DATADIR_FULL NORMALIZE "${CMAKE_INSTALL_DATADIR}")
|
||||
@@ -0,0 +1,51 @@
|
||||
# Emscripten specific settings
|
||||
|
||||
if(NOT EMSCRIPTEN)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(CMAKE_EXECUTABLE_SUFFIX ".js")
|
||||
set(CMAKE_SHARED_LIBRARY_SUFFIX ".wasm")
|
||||
|
||||
# Disable options that don't make sense for emscripten
|
||||
set(BUILD_SERVER OFF CACHE INTERNAL "")
|
||||
set(BUILD_RENDERER_GL1 OFF CACHE INTERNAL "")
|
||||
set(USE_RENDERER_DLOPEN OFF CACHE INTERNAL "")
|
||||
set(USE_OPENAL_DLOPEN OFF CACHE INTERNAL "")
|
||||
set(BUILD_GAME_LIBRARIES OFF CACHE INTERNAL "")
|
||||
set(USE_HTTP OFF CACHE INTERNAL "")
|
||||
|
||||
# Disable LTO since the libraries Emscripten provides aren't LTO enabled
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION FALSE)
|
||||
|
||||
list(APPEND CLIENT_LINK_OPTIONS
|
||||
-sTOTAL_MEMORY=256MB
|
||||
-sSTACK_SIZE=5MB
|
||||
-sMIN_WEBGL_VERSION=1
|
||||
-sMAX_WEBGL_VERSION=2
|
||||
-sEXPORTED_RUNTIME_METHODS=FS,addRunDependency,removeRunDependency
|
||||
-sEXIT_RUNTIME=1
|
||||
-sEXPORT_ES6
|
||||
-sEXPORT_NAME=${CLIENT_NAME}
|
||||
)
|
||||
|
||||
option(EMSCRIPTEN_PRELOAD_FILE "Preload game files into .data file" OFF)
|
||||
|
||||
if(EMSCRIPTEN_PRELOAD_FILE)
|
||||
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/${BASEGAME}")
|
||||
message(FATAL_ERROR "No files in '${BASEGAME}' directory for emscripten to preload.")
|
||||
endif()
|
||||
list(APPEND CLIENT_LINK_OPTIONS --preload-file "${BASEGAME}")
|
||||
endif()
|
||||
|
||||
list(APPEND POST_CONFIGURE_FUNCTIONS deploy_shell_files)
|
||||
|
||||
function(deploy_shell_files)
|
||||
configure_file(${SOURCE_DIR}/web/client.html.in
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${CLIENT_NAME}.html @ONLY)
|
||||
|
||||
if(NOT EMSCRIPTEN_PRELOAD_FILE)
|
||||
configure_file(${SOURCE_DIR}/web/client-config.json
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${CLIENT_NAME}-config.json COPYONLY)
|
||||
endif()
|
||||
endfunction()
|
||||
@@ -0,0 +1,15 @@
|
||||
# Linux-like specific settings, i.e. including FreeBSD etc.
|
||||
|
||||
if(NOT UNIX OR APPLE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
list(APPEND CLIENT_DEFINITIONS USE_ICON)
|
||||
list(APPEND RENDERER_DEFINITIONS USE_ICON)
|
||||
|
||||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set_property(CACHE CMAKE_INSTALL_PREFIX PROPERTY VALUE /opt/mohaa)
|
||||
endif()
|
||||
|
||||
set(CPACK_GENERATOR "DEB")
|
||||
set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
@@ -0,0 +1,118 @@
|
||||
# macOS specific settings
|
||||
|
||||
if(NOT APPLE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
option(BUILD_MACOS_APP "Deploy as a macOS .app" ON)
|
||||
|
||||
enable_language(OBJC)
|
||||
|
||||
list(APPEND SYSTEM_PLATFORM_SOURCES ${SOURCE_DIR}/sys/sys_osx.m)
|
||||
|
||||
list(APPEND COMMON_LIBRARIES "-framework Cocoa")
|
||||
list(APPEND CLIENT_LIBRARIES "-framework IOKit")
|
||||
list(APPEND RENDERER_LIBRARIES "-framework OpenGL")
|
||||
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 11.0)
|
||||
set(CMAKE_OSX_ARCHITECTURES arm64;x86_64)
|
||||
|
||||
if(BUILD_MACOS_APP)
|
||||
set(CLIENT_EXECUTABLE_OPTIONS MACOSX_BUNDLE)
|
||||
list(APPEND POST_CONFIGURE_FUNCTIONS finish_macos_app)
|
||||
endif()
|
||||
|
||||
function(finish_macos_app)
|
||||
get_filename_component(MACOS_ICON_FILE ${MACOS_ICON_PATH} NAME)
|
||||
|
||||
set(MACOS_APP_BUNDLE_NAME ${CLIENT_NAME})
|
||||
set(MACOS_APP_EXECUTABLE_NAME ${CLIENT_BINARY})
|
||||
set(MACOS_APP_GUI_IDENTIFIER ${MACOS_BUNDLE_ID})
|
||||
set(MACOS_APP_ICON_FILE ${MACOS_ICON_FILE})
|
||||
set(MACOS_APP_SHORT_VERSION_STRING ${PRODUCT_VERSION})
|
||||
set(MACOS_APP_BUNDLE_VERSION ${PRODUCT_VERSION})
|
||||
set(MACOS_APP_DEPLOYMENT_TARGET ${CMAKE_OSX_DEPLOYMENT_TARGET})
|
||||
set(MACOS_APP_COPYRIGHT ${COPYRIGHT})
|
||||
|
||||
if(PROTOCOL_HANDLER_SCHEME)
|
||||
set(MACOS_APP_PLIST_URL_TYPES
|
||||
"<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>${MACOS_APP_BUNDLE_NAME}</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>${PROTOCOL_HANDLER_SCHEME}</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>")
|
||||
else()
|
||||
set(MACOS_APP_PLIST_URL_TYPES "")
|
||||
endif()
|
||||
|
||||
configure_file(${CMAKE_SOURCE_DIR}/cmake/Info.plist.in
|
||||
${CMAKE_BINARY_DIR}/Info.plist @ONLY)
|
||||
|
||||
set_target_properties(${CLIENT_BINARY} PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_BINARY_DIR}/Info.plist)
|
||||
|
||||
set(RESOURCES_DIR $<TARGET_FILE_DIR:${CLIENT_BINARY}>/../Resources)
|
||||
add_custom_command(TARGET ${CLIENT_BINARY} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${RESOURCES_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${MACOS_ICON_PATH} ${RESOURCES_DIR})
|
||||
|
||||
if(USE_RENDERER_DLOPEN)
|
||||
set(MACOS_APP_BINARY_DIR ${CLIENT_BINARY}.app/Contents/MacOS)
|
||||
|
||||
if(BUILD_RENDERER_GL1)
|
||||
set_output_dirs(${RENDERER_GL1_BINARY} SUBDIRECTORY ${MACOS_APP_BINARY_DIR})
|
||||
add_dependencies(${CLIENT_BINARY} ${RENDERER_GL1_BINARY})
|
||||
endif()
|
||||
|
||||
if(BUILD_RENDERER_GL2)
|
||||
set_output_dirs(${RENDERER_GL2_BINARY} SUBDIRECTORY ${MACOS_APP_BINARY_DIR})
|
||||
add_dependencies(${CLIENT_BINARY} ${RENDERER_GL2_BINARY})
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
if(NOT "$ENV{APPLE_CERTIFICATE_ID}" STREQUAL "")
|
||||
list(APPEND POST_CONFIGURE_FUNCTIONS codesign)
|
||||
|
||||
function(codesign)
|
||||
set(DEV_ID "Developer ID Application")
|
||||
|
||||
get_directory_property(INSTALL_TARGETS DIRECTORY
|
||||
${CMAKE_SOURCE_DIR} BUILDSYSTEM_TARGETS)
|
||||
|
||||
# Code sign everything that will be installed
|
||||
foreach(TARGET IN LISTS INSTALL_TARGETS)
|
||||
get_target_property(DESTINATION ${TARGET} INSTALL_DESTINATION)
|
||||
if(NOT DESTINATION)
|
||||
continue()
|
||||
endif()
|
||||
|
||||
add_custom_command(TARGET ${TARGET} POST_BUILD
|
||||
COMMAND codesign --force --deep --options runtime
|
||||
--entitlements ${CMAKE_SOURCE_DIR}/cmake/entitlements.plist
|
||||
--sign "$ENV{APPLE_CERTIFICATE_ID}"
|
||||
"$<TARGET_FILE:${TARGET}>"
|
||||
COMMENT "Code Signing for macOS: $<TARGET_FILE_BASE_NAME:${TARGET}>")
|
||||
endforeach()
|
||||
endfunction()
|
||||
endif()
|
||||
|
||||
set(CPACK_GENERATOR "DragNDrop")
|
||||
|
||||
set(CPACK_DMG_VOLUME_NAME "${PROJECT_NAME} Installer")
|
||||
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_SOURCE_DIR}/misc/macos/macos-dmg-background.png")
|
||||
set(CPACK_DMG_SUBDIRECTORY "${CLIENT_NAME}")
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_SOURCE_DIR}/misc/macos/macos-dmg-setup.applescript.in"
|
||||
"${CMAKE_BINARY_DIR}/macos-dmg-setup.applescript"
|
||||
@ONLY
|
||||
)
|
||||
|
||||
set(CPACK_DMG_DS_STORE_SETUP_SCRIPT "${CMAKE_BINARY_DIR}/macos-dmg-setup.applescript")
|
||||
@@ -0,0 +1,34 @@
|
||||
# Unix specific settings (this includes macOS and emscripten)
|
||||
|
||||
if(NOT UNIX)
|
||||
return()
|
||||
endif()
|
||||
|
||||
list(APPEND SYSTEM_PLATFORM_SOURCES ${SOURCE_DIR}/sys/sys_unix.c)
|
||||
|
||||
if(EMSCRIPTEN)
|
||||
list(APPEND SYSTEM_PLATFORM_SOURCES ${SOURCE_DIR}/sys/con_passive.c)
|
||||
else()
|
||||
list(APPEND SYSTEM_PLATFORM_SOURCES ${SOURCE_DIR}/sys/con_tty.c)
|
||||
endif()
|
||||
|
||||
#if(USE_HTTP)
|
||||
# list(APPEND CLIENT_PLATFORM_SOURCES ${SOURCE_DIR}/client/cl_http_curl.c)
|
||||
#endif()
|
||||
|
||||
list(APPEND COMMON_LIBRARIES
|
||||
${CMAKE_DL_LIBS} # Dynamic loader
|
||||
m # Math library
|
||||
)
|
||||
|
||||
list(APPEND SYSTEM_PLATFORM_SOURCES ${SOURCE_DIR}/sys/new/sys_unix_new.c)
|
||||
|
||||
find_package(Threads)
|
||||
list(APPEND COMMON_LIBRARIES ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
#
|
||||
# Setup the installation directory
|
||||
#
|
||||
set(CMAKE_DEFAULT_INSTALL_RUNTIME_DIR lib${CMAKE_LIB_SUFFIX})
|
||||
set(BIN_INSTALL_SUBDIR ${CMAKE_PROJECT_NAME})
|
||||
set(LIB_INSTALL_SUBDIR ${CMAKE_PROJECT_NAME})
|
||||
@@ -0,0 +1,73 @@
|
||||
# Windows specific settings
|
||||
|
||||
if(NOT WIN32)
|
||||
return()
|
||||
endif()
|
||||
|
||||
list(APPEND SYSTEM_PLATFORM_SOURCES
|
||||
${SOURCE_DIR}/sys/sys_win32.c
|
||||
${SOURCE_DIR}/sys/win_resource.rc
|
||||
)
|
||||
|
||||
list(APPEND CLIENT_PLATFORM_SOURCES ${SOURCE_DIR}/sys/con_passive.c)
|
||||
list(APPEND SERVER_PLATFORM_SOURCES ${SOURCE_DIR}/sys/con_win32.c)
|
||||
|
||||
|
||||
#if(USE_HTTP)
|
||||
# list(APPEND CLIENT_PLATFORM_SOURCES ${SOURCE_DIR}/client/cl_http_windows.c)
|
||||
# list(APPEND CLIENT_LIBRARIES wininet)
|
||||
#endif()
|
||||
|
||||
list(APPEND COMMON_LIBRARIES
|
||||
ws2_32 # Windows Sockets 2
|
||||
winmm # timeBeginPeriod/timeEndPeriod
|
||||
psapi # EnumProcesses
|
||||
)
|
||||
|
||||
if(MINGW)
|
||||
list(APPEND COMMON_LIBRARIES mingw32)
|
||||
endif()
|
||||
|
||||
list(APPEND CLIENT_DEFINITIONS USE_ICON)
|
||||
|
||||
set_source_files_properties(${SOURCE_DIR}/sys/win_resource.rc
|
||||
PROPERTIES COMPILE_DEFINITIONS WINDOWS_ICON_PATH=${WINDOWS_ICON_PATH})
|
||||
|
||||
if(MSVC)
|
||||
# We have our own manifest, disable auto creation
|
||||
list(APPEND SERVER_LINK_OPTIONS "/MANIFEST:NO")
|
||||
list(APPEND CLIENT_LINK_OPTIONS "/MANIFEST:NO")
|
||||
endif()
|
||||
|
||||
set(CLIENT_EXECUTABLE_OPTIONS WIN32)
|
||||
|
||||
# It's only necessary to set this on Windows; elsewhere
|
||||
# CMAKE_EXECUTABLE_SUFFIX will be empty anyway, or we want
|
||||
# HOST_EXECUTABLE_SUFFIX to be empty for other reasons
|
||||
set(HOST_EXECUTABLE_SUFFIX ${CMAKE_EXECUTABLE_SUFFIX})
|
||||
|
||||
set(CPACK_GENERATOR NSIS)
|
||||
set(CPACK_NSIS_MUI_ICON ${WINDOWS_ICON_PATH})
|
||||
set(CPACK_NSIS_EXECUTABLES_DIRECTORY .)
|
||||
|
||||
#
|
||||
# non-ioq3
|
||||
#
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug|RelWithDebInfo)
|
||||
# Enable the console in debug builds
|
||||
list(REMOVE_ITEM CLIENT_PLATFORM_SOURCES ${SOURCE_DIR}/sys/con_passive.c)
|
||||
list(APPEND CLIENT_PLATFORM_SOURCES ${SOURCE_DIR}/sys/con_win32.c)
|
||||
set(CLIENT_EXECUTABLE_OPTIONS)
|
||||
endif()
|
||||
|
||||
list(APPEND SYSTEM_PLATFORM_SOURCES ${SOURCE_DIR}/sys/new/sys_win32_new.c)
|
||||
list(APPEND COMMON_LIBRARIES dbghelp)
|
||||
|
||||
#
|
||||
# Setup the installation directory
|
||||
#
|
||||
# By default, both DLLs and EXEs are in the same directory
|
||||
set(CMAKE_DEFAULT_INSTALL_RUNTIME_DIR bin)
|
||||
set(BIN_INSTALL_SUBDIR ".")
|
||||
set(LIB_INSTALL_SUBDIR ".")
|
||||
@@ -0,0 +1,3 @@
|
||||
foreach(POST_CONFIGURE_FUNCTION IN LISTS POST_CONFIGURE_FUNCTIONS)
|
||||
cmake_language(CALL ${POST_CONFIGURE_FUNCTION})
|
||||
endforeach()
|
||||
@@ -28,4 +28,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#define GIT_REVISION_DATE_TIME "${GIT_REVISION_DATE_TIME}"
|
||||
#define GIT_REVISION_DATE "${GIT_REVISION_DATE}"
|
||||
#define GIT_REVISION_BUILD_NUMBER ${GIT_REVISION_BUILD_NUMBER}
|
||||
|
||||
#define PRODUCT_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}
|
||||
#define PRODUCT_VERSION_MINOR ${PROJECT_VERSION_MINOR}
|
||||
#define PRODUCT_VERSION_PATCH ${PROJECT_VERSION_PATCH}
|
||||
#define PRODUCT_VERSION_STAGE "${PRODUCT_VERSION_STAGE}"
|
||||
@@ -0,0 +1,42 @@
|
||||
include_guard(GLOBAL)
|
||||
|
||||
set(RENDERER_COMMON_SOURCES
|
||||
${SOURCE_DIR}/renderercommon/tr_font.c
|
||||
${SOURCE_DIR}/renderercommon/tr_image_bmp.c
|
||||
${SOURCE_DIR}/renderercommon/tr_image_jpg.c
|
||||
${SOURCE_DIR}/renderercommon/tr_image_pcx.c
|
||||
${SOURCE_DIR}/renderercommon/tr_image_png.c
|
||||
${SOURCE_DIR}/renderercommon/tr_image_pvr.c
|
||||
${SOURCE_DIR}/renderercommon/tr_image_tga.c
|
||||
${SOURCE_DIR}/renderercommon/tr_noise.c
|
||||
${SOURCE_DIR}/renderercommon/puff.c
|
||||
${SOURCE_DIR}/tiki/tiki_mesh.cpp
|
||||
)
|
||||
|
||||
set(SDL_RENDERER_SOURCES
|
||||
${SOURCE_DIR}/sdl/sdl_gamma.c
|
||||
${SOURCE_DIR}/sdl/sdl_glimp.c
|
||||
)
|
||||
|
||||
set(DYNAMIC_RENDERER_SOURCES
|
||||
${SOURCE_DIR}/renderercommon/tr_subs.c
|
||||
${SOURCE_DIR}/qcommon/q_shared.c
|
||||
${SOURCE_DIR}/qcommon/q_math.c
|
||||
${SOURCE_DIR}/corepp/str.cpp
|
||||
)
|
||||
|
||||
if(USE_FREETYPE)
|
||||
list(APPEND RENDERER_DEFINITIONS BUILD_FREETYPE)
|
||||
endif()
|
||||
|
||||
if(USE_RENDERER_DLOPEN)
|
||||
list(APPEND RENDERER_DEFINITIONS USE_RENDERER_DLOPEN)
|
||||
list(APPEND RENDERER_DEFINITIONS REF_DLL=1)
|
||||
elseif(BUILD_RENDERER_GL1 AND BUILD_RENDERER_GL2)
|
||||
message(FATAL_ERROR "Multiple static renderers enabled; choose one")
|
||||
elseif(NOT BUILD_RENDERER_GL1 AND NOT BUILD_RENDERER_GL2)
|
||||
message(FATAL_ERROR "Zero static renderers enabled; choose one")
|
||||
endif()
|
||||
|
||||
list(APPEND RENDERER_LIBRARIES ${COMMON_LIBRARIES})
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
if(NOT BUILD_CLIENT OR NOT BUILD_RENDERER_GL1)
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(utils/set_output_dirs)
|
||||
include(renderer_common)
|
||||
|
||||
set(RENDERER_GL1_SOURCES
|
||||
${SOURCE_DIR}/renderergl1/tr_backend.c
|
||||
${SOURCE_DIR}/renderergl1/tr_bsp.c
|
||||
${SOURCE_DIR}/renderergl1/tr_cmds.c
|
||||
${SOURCE_DIR}/renderergl1/tr_curve.c
|
||||
${SOURCE_DIR}/renderergl1/tr_draw.c
|
||||
${SOURCE_DIR}/renderergl1/tr_flares.c
|
||||
${SOURCE_DIR}/renderergl1/tr_font.cpp
|
||||
${SOURCE_DIR}/renderergl1/tr_ghost.cpp
|
||||
${SOURCE_DIR}/renderergl1/tr_image.c
|
||||
${SOURCE_DIR}/renderergl1/tr_init.c
|
||||
${SOURCE_DIR}/renderergl1/tr_light.c
|
||||
${SOURCE_DIR}/renderergl1/tr_main.c
|
||||
${SOURCE_DIR}/renderergl1/tr_marks_permanent.c
|
||||
${SOURCE_DIR}/renderergl1/tr_marks.c
|
||||
${SOURCE_DIR}/renderergl1/tr_model.cpp
|
||||
${SOURCE_DIR}/renderergl1/tr_scene.c
|
||||
${SOURCE_DIR}/renderergl1/tr_shade_calc.c
|
||||
${SOURCE_DIR}/renderergl1/tr_shade.c
|
||||
${SOURCE_DIR}/renderergl1/tr_shader.c
|
||||
${SOURCE_DIR}/renderergl1/tr_shadows.c
|
||||
${SOURCE_DIR}/renderergl1/tr_sky_portal.cpp
|
||||
${SOURCE_DIR}/renderergl1/tr_sky.c
|
||||
${SOURCE_DIR}/renderergl1/tr_sphere_shade.cpp
|
||||
${SOURCE_DIR}/renderergl1/tr_sprite.c
|
||||
${SOURCE_DIR}/renderergl1/tr_staticmodels.cpp
|
||||
${SOURCE_DIR}/renderergl1/tr_sun_flare.cpp
|
||||
${SOURCE_DIR}/renderergl1/tr_surface.c
|
||||
${SOURCE_DIR}/renderergl1/tr_swipe.cpp
|
||||
${SOURCE_DIR}/renderergl1/tr_terrain.c
|
||||
${SOURCE_DIR}/renderergl1/tr_util.cpp
|
||||
${SOURCE_DIR}/renderergl1/tr_vis.cpp
|
||||
${SOURCE_DIR}/renderergl1/tr_world.c
|
||||
)
|
||||
|
||||
set(RENDERER_GL1_BASENAME renderer_opengl1)
|
||||
set(RENDERER_GL1_BINARY ${RENDERER_GL1_BASENAME})
|
||||
|
||||
list(APPEND RENDERER_GL1_BINARY_SOURCES
|
||||
${RENDERER_COMMON_SOURCES}
|
||||
${RENDERER_GL1_SOURCES}
|
||||
${SDL_RENDERER_SOURCES}
|
||||
${RENDERER_LIBRARY_SOURCES})
|
||||
|
||||
if(USE_RENDERER_DLOPEN)
|
||||
list(APPEND RENDERER_GL1_BINARY_SOURCES ${DYNAMIC_RENDERER_SOURCES})
|
||||
|
||||
add_library(${RENDERER_GL1_BINARY} SHARED ${RENDERER_GL1_BINARY_SOURCES})
|
||||
|
||||
target_link_libraries( ${RENDERER_GL1_BINARY} PRIVATE ${RENDERER_LIBRARIES})
|
||||
target_include_directories( ${RENDERER_GL1_BINARY} PRIVATE ${RENDERER_INCLUDE_DIRS})
|
||||
target_compile_definitions( ${RENDERER_GL1_BINARY} PRIVATE ${RENDERER_DEFINITIONS})
|
||||
target_compile_options( ${RENDERER_GL1_BINARY} PRIVATE ${RENDERER_COMPILE_OPTIONS})
|
||||
target_link_options( ${RENDERER_GL1_BINARY} PRIVATE ${RENDERER_LINK_OPTIONS})
|
||||
|
||||
set_output_dirs(${RENDERER_GL1_BINARY})
|
||||
|
||||
INSTALL(TARGETS ${RENDERER_GL1_BINARY} DESTINATION ${INSTALL_LIBDIR_FULL})
|
||||
|
||||
if(MSVC)
|
||||
INSTALL(FILES $<TARGET_PDB_FILE:${RENDERER_GL1_BINARY}> DESTINATION ${INSTALL_LIBDIR_FULL} OPTIONAL)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,106 @@
|
||||
if(NOT BUILD_CLIENT OR NOT BUILD_RENDERER_GL2)
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(utils/set_output_dirs)
|
||||
include(renderer_common)
|
||||
|
||||
set(RENDERER_GL2_SOURCES
|
||||
${SOURCE_DIR}/renderergl2/tr_animation.c
|
||||
${SOURCE_DIR}/renderergl2/tr_backend.c
|
||||
${SOURCE_DIR}/renderergl2/tr_bsp.c
|
||||
${SOURCE_DIR}/renderergl2/tr_cmds.c
|
||||
${SOURCE_DIR}/renderergl2/tr_curve.c
|
||||
${SOURCE_DIR}/renderergl2/tr_draw.c
|
||||
${SOURCE_DIR}/renderergl2/tr_dsa.c
|
||||
${SOURCE_DIR}/renderergl2/tr_extramath.c
|
||||
${SOURCE_DIR}/renderergl2/tr_extensions.c
|
||||
${SOURCE_DIR}/renderergl2/tr_fbo.c
|
||||
${SOURCE_DIR}/renderergl2/tr_flares.c
|
||||
${SOURCE_DIR}/renderergl2/tr_font.cpp
|
||||
${SOURCE_DIR}/renderergl2/tr_ghost.cpp
|
||||
${SOURCE_DIR}/renderergl2/tr_glsl.c
|
||||
${SOURCE_DIR}/renderergl2/tr_image.c
|
||||
${SOURCE_DIR}/renderergl2/tr_image_dds.c
|
||||
${SOURCE_DIR}/renderergl2/tr_init.c
|
||||
${SOURCE_DIR}/renderergl2/tr_light.c
|
||||
${SOURCE_DIR}/renderergl2/tr_main.c
|
||||
${SOURCE_DIR}/renderergl2/tr_marks_permanent.c
|
||||
${SOURCE_DIR}/renderergl2/tr_marks.c
|
||||
${SOURCE_DIR}/renderergl2/tr_mesh.c
|
||||
${SOURCE_DIR}/renderergl2/tr_model_iqm.c
|
||||
${SOURCE_DIR}/renderergl2/tr_model.cpp
|
||||
${SOURCE_DIR}/renderergl2/tr_postprocess.c
|
||||
${SOURCE_DIR}/renderergl2/tr_scene.c
|
||||
${SOURCE_DIR}/renderergl2/tr_shade_calc.c
|
||||
${SOURCE_DIR}/renderergl2/tr_shade.c
|
||||
${SOURCE_DIR}/renderergl2/tr_shader.c
|
||||
${SOURCE_DIR}/renderergl2/tr_shadows.c
|
||||
${SOURCE_DIR}/renderergl2/tr_sky_portal.cpp
|
||||
${SOURCE_DIR}/renderergl2/tr_sky.c
|
||||
${SOURCE_DIR}/renderergl2/tr_sphere_shade.cpp
|
||||
${SOURCE_DIR}/renderergl2/tr_sprite.c
|
||||
${SOURCE_DIR}/renderergl2/tr_staticmodels.cpp
|
||||
${SOURCE_DIR}/renderergl2/tr_sun_flare.cpp
|
||||
${SOURCE_DIR}/renderergl2/tr_surface.c
|
||||
${SOURCE_DIR}/renderergl2/tr_swipe.cpp
|
||||
${SOURCE_DIR}/renderergl2/tr_terrain.c
|
||||
${SOURCE_DIR}/renderergl2/tr_util.cpp
|
||||
${SOURCE_DIR}/renderergl2/tr_vbo.c
|
||||
${SOURCE_DIR}/renderergl2/tr_vis.cpp
|
||||
${SOURCE_DIR}/renderergl2/tr_world.c
|
||||
)
|
||||
|
||||
file(GLOB RENDERER_GL2_SHADER_SOURCES ${SOURCE_DIR}/renderergl2/glsl/*.glsl)
|
||||
|
||||
set(SHADERS_DIR ${CMAKE_BINARY_DIR}/shaders.dir)
|
||||
file(MAKE_DIRECTORY ${SHADERS_DIR})
|
||||
|
||||
foreach(SHADER_FILE IN LISTS RENDERER_GL2_SHADER_SOURCES)
|
||||
get_filename_component(SHADER_NAME ${SHADER_FILE} NAME_WE)
|
||||
set(SHADER_C_FILE ${SHADERS_DIR}/${SHADER_NAME}.c)
|
||||
|
||||
string(REPLACE "${CMAKE_BINARY_DIR}/" "" SHADER_C_FILE_COMMENT ${SHADER_C_FILE})
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${SHADER_C_FILE}
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DINPUT_FILE=${SHADER_FILE}
|
||||
-DOUTPUT_FILE=${SHADER_C_FILE}
|
||||
-DSHADER_NAME=${SHADER_NAME}
|
||||
-P ${CMAKE_SOURCE_DIR}/cmake/utils/stringify_shader.cmake
|
||||
DEPENDS ${SHADER_FILE}
|
||||
COMMENT "Stringify shader ${SHADER_C_FILE_COMMENT}")
|
||||
|
||||
list(APPEND RENDERER_GL2_SHADER_C_SOURCES ${SHADER_C_FILE})
|
||||
endforeach()
|
||||
|
||||
set(RENDERER_GL2_BASENAME renderer_opengl2)
|
||||
set(RENDERER_GL2_BINARY ${RENDERER_GL2_BASENAME})
|
||||
|
||||
list(APPEND RENDERER_GL2_BINARY_SOURCES
|
||||
${RENDERER_COMMON_SOURCES}
|
||||
${RENDERER_GL2_SOURCES}
|
||||
${RENDERER_GL2_SHADER_C_SOURCES}
|
||||
${SDL_RENDERER_SOURCES}
|
||||
${RENDERER_LIBRARY_SOURCES})
|
||||
|
||||
if(USE_RENDERER_DLOPEN)
|
||||
list(APPEND RENDERER_GL2_BINARY_SOURCES ${DYNAMIC_RENDERER_SOURCES})
|
||||
|
||||
add_library(${RENDERER_GL2_BINARY} SHARED ${RENDERER_GL2_BINARY_SOURCES})
|
||||
|
||||
target_link_libraries( ${RENDERER_GL2_BINARY} PRIVATE ${RENDERER_LIBRARIES})
|
||||
target_include_directories( ${RENDERER_GL2_BINARY} PRIVATE ${RENDERER_INCLUDE_DIRS})
|
||||
target_compile_definitions( ${RENDERER_GL2_BINARY} PRIVATE ${RENDERER_DEFINITIONS})
|
||||
target_compile_options( ${RENDERER_GL2_BINARY} PRIVATE ${RENDERER_COMPILE_OPTIONS})
|
||||
target_link_options( ${RENDERER_GL2_BINARY} PRIVATE ${RENDERER_LINK_OPTIONS})
|
||||
|
||||
set_output_dirs(${RENDERER_GL2_BINARY})
|
||||
|
||||
INSTALL(TARGETS ${RENDERER_GL2_BINARY} DESTINATION ${INSTALL_LIBDIR_FULL})
|
||||
|
||||
if(MSVC)
|
||||
INSTALL(FILES $<TARGET_PDB_FILE:${RENDERER_GL2_BINARY}> DESTINATION ${INSTALL_LIBDIR_FULL} OPTIONAL)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,66 @@
|
||||
|
||||
if(NOT BUILD_SERVER)
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(utils/set_output_dirs)
|
||||
include(shared_sources)
|
||||
include(shared_script)
|
||||
|
||||
set(NULL_SOURCES
|
||||
${SOURCE_DIR}/null/null_client.c
|
||||
${SOURCE_DIR}/null/null_input.c
|
||||
${SOURCE_DIR}/null/null_snddma.c
|
||||
)
|
||||
|
||||
set(SERVER_BINARY ${SERVER_NAME})
|
||||
|
||||
list(APPEND SERVER_DEFINITIONS DEDICATED)
|
||||
list(APPEND SERVER_DEFINITIONS BOTLIB)
|
||||
list(APPEND SERVER_DEFINITIONS APP_MODULE)
|
||||
|
||||
if(BUILD_STANDALONE)
|
||||
list(APPEND SERVER_DEFINITIONS STANDALONE)
|
||||
endif()
|
||||
|
||||
if(USE_VOIP)
|
||||
list(APPEND SERVER_DEFINITIONS USE_VOIP)
|
||||
endif()
|
||||
|
||||
if(USE_HTTP)
|
||||
list(APPEND SERVER_DEFINITIONS USE_HTTP)
|
||||
endif()
|
||||
|
||||
list(APPEND SERVER_BINARY_SOURCES
|
||||
${SERVER_SOURCES}
|
||||
${NULL_SOURCES}
|
||||
${COMMON_SOURCES}
|
||||
${SCRIPT_SYSTEM_SOURCES}
|
||||
${BOTLIB_SOURCES}
|
||||
${SYSTEM_SOURCES}
|
||||
${ASM_SOURCES}
|
||||
${SERVER_PLATFORM_SOURCES}
|
||||
${SERVER_LIBRARY_SOURCES})
|
||||
|
||||
add_executable(${SERVER_BINARY} ${SERVER_EXECUTABLE_OPTIONS} ${SERVER_BINARY_SOURCES})
|
||||
|
||||
target_include_directories( ${SERVER_BINARY} PRIVATE ${SERVER_INCLUDE_DIRS})
|
||||
target_compile_definitions( ${SERVER_BINARY} PRIVATE ${SERVER_DEFINITIONS})
|
||||
target_compile_options( ${SERVER_BINARY} PRIVATE ${SERVER_COMPILE_OPTIONS})
|
||||
target_link_libraries( ${SERVER_BINARY} PRIVATE ${COMMON_LIBRARIES} ${SERVER_LIBRARIES})
|
||||
target_link_options( ${SERVER_BINARY} PRIVATE ${SERVER_LINK_OPTIONS})
|
||||
|
||||
set_output_dirs(${SERVER_BINARY})
|
||||
|
||||
if(POST_SERVER_CONFIGURE_FUNCTION)
|
||||
cmake_language(CALL ${POST_SERVER_CONFIGURE_FUNCTION})
|
||||
endif()
|
||||
|
||||
set_target_properties(${SERVER_BINARY} PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
|
||||
|
||||
INSTALL(TARGETS ${SERVER_BINARY} DESTINATION ${INSTALL_BINDIR_FULL})
|
||||
|
||||
if (MSVC)
|
||||
target_link_options(${SERVER_BINARY} PRIVATE "/MANIFEST:NO")
|
||||
INSTALL(FILES $<TARGET_PDB_FILE:${SERVER_BINARY}> DESTINATION ${INSTALL_BINDIR_FULL} OPTIONAL)
|
||||
endif()
|
||||
@@ -0,0 +1,17 @@
|
||||
include_guard(GLOBAL)
|
||||
|
||||
set(SCRIPT_SYSTEM_SOURCES
|
||||
${SOURCE_DIR}/corepp/class.cpp
|
||||
${SOURCE_DIR}/corepp/con_set.cpp
|
||||
${SOURCE_DIR}/corepp/con_timer.cpp
|
||||
${SOURCE_DIR}/corepp/delegate.cpp
|
||||
${SOURCE_DIR}/corepp/lightclass.cpp
|
||||
${SOURCE_DIR}/corepp/listener.cpp
|
||||
${SOURCE_DIR}/corepp/lz77.cpp
|
||||
${SOURCE_DIR}/corepp/mem_blockalloc.cpp
|
||||
${SOURCE_DIR}/corepp/mem_tempalloc.cpp
|
||||
${SOURCE_DIR}/corepp/script.cpp
|
||||
${SOURCE_DIR}/corepp/str.cpp
|
||||
${SOURCE_DIR}/script/scriptexception.cpp
|
||||
${SOURCE_DIR}/script/scriptvariable.cpp
|
||||
)
|
||||
@@ -0,0 +1,106 @@
|
||||
include_guard(GLOBAL)
|
||||
|
||||
include(utils/add_git_dependency)
|
||||
include(utils/disable_warnings)
|
||||
include(gamespy)
|
||||
|
||||
set(COMMON_SOURCES
|
||||
${SOURCE_DIR}/qcommon/alias.c
|
||||
${SOURCE_DIR}/qcommon/bg_compat.cpp
|
||||
${SOURCE_DIR}/qcommon/cm_fencemask.c
|
||||
${SOURCE_DIR}/qcommon/cm_load.c
|
||||
${SOURCE_DIR}/qcommon/cm_patch.c
|
||||
${SOURCE_DIR}/qcommon/cm_polylib.c
|
||||
${SOURCE_DIR}/qcommon/cm_terrain.c
|
||||
${SOURCE_DIR}/qcommon/cm_test.c
|
||||
${SOURCE_DIR}/qcommon/cm_trace.c
|
||||
${SOURCE_DIR}/qcommon/cm_trace_lbd.cpp
|
||||
${SOURCE_DIR}/qcommon/cm_trace_obfuscation.cpp
|
||||
${SOURCE_DIR}/qcommon/cmd.c
|
||||
${SOURCE_DIR}/qcommon/common.c
|
||||
${SOURCE_DIR}/qcommon/crc.c
|
||||
${SOURCE_DIR}/qcommon/cvar.c
|
||||
${SOURCE_DIR}/qcommon/files.cpp
|
||||
${SOURCE_DIR}/qcommon/ioapi.c
|
||||
${SOURCE_DIR}/qcommon/huffman.cpp
|
||||
${SOURCE_DIR}/qcommon/md4.c
|
||||
${SOURCE_DIR}/qcommon/md5.c
|
||||
${SOURCE_DIR}/qcommon/memory.c
|
||||
${SOURCE_DIR}/qcommon/msg.cpp
|
||||
${SOURCE_DIR}/qcommon/net_chan.c
|
||||
${SOURCE_DIR}/qcommon/net_ip.c
|
||||
${SOURCE_DIR}/qcommon/q_math.c
|
||||
${SOURCE_DIR}/qcommon/q_shared.c
|
||||
${SOURCE_DIR}/qcommon/unzip.c
|
||||
${SOURCE_DIR}/gamespy/q_gamespy.c
|
||||
)
|
||||
|
||||
disable_warnings(
|
||||
${SOURCE_DIR}/qcommon/unzip.c
|
||||
${SOURCE_DIR}/qcommon/ioapi.c
|
||||
)
|
||||
|
||||
add_git_dependency(${SOURCE_DIR}/qcommon/common.c)
|
||||
|
||||
set(SYSTEM_SOURCES
|
||||
${SOURCE_DIR}/sys/con_log.c
|
||||
${SOURCE_DIR}/sys/sys_autoupdater.c
|
||||
${SOURCE_DIR}/sys/sys_main.c
|
||||
${SYSTEM_PLATFORM_SOURCES}
|
||||
)
|
||||
|
||||
set(SERVER_SOURCES
|
||||
${SOURCE_DIR}/server/sv_client.c
|
||||
${SOURCE_DIR}/server/sv_ccmds.c
|
||||
${SOURCE_DIR}/server/sv_game.c
|
||||
${SOURCE_DIR}/server/sv_init.c
|
||||
${SOURCE_DIR}/server/sv_main.c
|
||||
${SOURCE_DIR}/server/sv_net_chan.c
|
||||
${SOURCE_DIR}/server/sv_snapshot.c
|
||||
${SOURCE_DIR}/server/sv_snd.c
|
||||
${SOURCE_DIR}/server/sv_world.c
|
||||
)
|
||||
|
||||
list(APPEND SYSTEM_SOURCES
|
||||
${SOURCE_DIR}/sys/new/sys_main_new.c
|
||||
${SOURCE_DIR}/sys/win_bounds.cpp
|
||||
${SOURCE_DIR}/sys/win_localization.cpp
|
||||
${SOURCE_DIR}/sys/sys_curl.c
|
||||
${SOURCE_DIR}/sys/sys_update_checker.cpp
|
||||
)
|
||||
|
||||
# Append TIKI sources
|
||||
|
||||
list(APPEND COMMON_SOURCES
|
||||
${SOURCE_DIR}/skeletor/bonetable.cpp
|
||||
${SOURCE_DIR}/skeletor/skeletor_imports.cpp
|
||||
${SOURCE_DIR}/skeletor/skeletor_loadanimation.cpp
|
||||
${SOURCE_DIR}/skeletor/skeletor_model_files.cpp
|
||||
${SOURCE_DIR}/skeletor/skeletor_utilities.cpp
|
||||
${SOURCE_DIR}/skeletor/skeletor.cpp
|
||||
${SOURCE_DIR}/skeletor/skeletorbones.cpp
|
||||
${SOURCE_DIR}/skeletor/tokenizer.cpp
|
||||
${SOURCE_DIR}/tiki/tiki_anim.cpp
|
||||
${SOURCE_DIR}/tiki/tiki_cache.cpp
|
||||
${SOURCE_DIR}/tiki/tiki_commands.cpp
|
||||
${SOURCE_DIR}/tiki/tiki_files.cpp
|
||||
${SOURCE_DIR}/tiki/tiki_frame.cpp
|
||||
${SOURCE_DIR}/tiki/tiki_imports.cpp
|
||||
${SOURCE_DIR}/tiki/tiki_parse.cpp
|
||||
${SOURCE_DIR}/tiki/tiki_skel.cpp
|
||||
${SOURCE_DIR}/tiki/tiki_surface.cpp
|
||||
${SOURCE_DIR}/tiki/tiki_tag.cpp
|
||||
${SOURCE_DIR}/tiki/tiki_utility.cpp
|
||||
${SOURCE_DIR}/corepp/tiki_main.cpp
|
||||
${SOURCE_DIR}/corepp/tiki_script.cpp
|
||||
)
|
||||
|
||||
# Gamespy
|
||||
|
||||
list(APPEND SERVER_SOURCES
|
||||
${SOURCE_DIR}/gamespy/sv_gamespy.c
|
||||
${SOURCE_DIR}/gamespy/sv_gqueryreporting.c
|
||||
)
|
||||
|
||||
include_directories(${SOURCE_DIR}/qcommon)
|
||||
include_directories(${SOURCE_DIR}/script)
|
||||
@@ -0,0 +1,3 @@
|
||||
enable_testing()
|
||||
|
||||
include(tests/lz77)
|
||||
@@ -0,0 +1,14 @@
|
||||
#
|
||||
# Unit tests
|
||||
#
|
||||
|
||||
add_executable(test_lz77
|
||||
${SOURCE_DIR}/corepp/tests/test_lz77.cpp
|
||||
${SOURCE_DIR}/corepp/lz77.cpp
|
||||
${SOURCE_DIR}/qcommon/q_shared.c
|
||||
${SOURCE_DIR}/qcommon/common_light.c
|
||||
)
|
||||
|
||||
target_link_libraries(test_lz77 INTERFACE testing)
|
||||
add_test(NAME test_lz77 COMMAND test_lz77)
|
||||
set_tests_properties(test_lz77 PROPERTIES TIMEOUT 15)
|
||||
@@ -0,0 +1,93 @@
|
||||
cmake_minimum_required(VERSION ${CMAKE_MINIMUM_REQUIRED_VERSION})
|
||||
project(qvm_tools LANGUAGES C)
|
||||
|
||||
include(utils/set_output_dirs)
|
||||
|
||||
set(Q3ASM_SOURCES
|
||||
${SOURCE_DIR}/tools/asm/q3asm.c
|
||||
${SOURCE_DIR}/tools/asm/cmdlib.c
|
||||
)
|
||||
|
||||
set(Q3LCC_SOURCES
|
||||
${SOURCE_DIR}/tools/lcc/etc/lcc.c
|
||||
${SOURCE_DIR}/tools/lcc/etc/bytecode.c
|
||||
)
|
||||
|
||||
set(Q3RCC_SOURCES
|
||||
${SOURCE_DIR}/tools/lcc/src/alloc.c
|
||||
${SOURCE_DIR}/tools/lcc/src/bind.c
|
||||
${SOURCE_DIR}/tools/lcc/src/bytecode.c
|
||||
${SOURCE_DIR}/tools/lcc/src/dag.c
|
||||
${SOURCE_DIR}/tools/lcc/src/decl.c
|
||||
${SOURCE_DIR}/tools/lcc/src/enode.c
|
||||
${SOURCE_DIR}/tools/lcc/src/error.c
|
||||
${SOURCE_DIR}/tools/lcc/src/event.c
|
||||
${SOURCE_DIR}/tools/lcc/src/expr.c
|
||||
${SOURCE_DIR}/tools/lcc/src/gen.c
|
||||
${SOURCE_DIR}/tools/lcc/src/init.c
|
||||
${SOURCE_DIR}/tools/lcc/src/inits.c
|
||||
${SOURCE_DIR}/tools/lcc/src/input.c
|
||||
${SOURCE_DIR}/tools/lcc/src/lex.c
|
||||
${SOURCE_DIR}/tools/lcc/src/list.c
|
||||
${SOURCE_DIR}/tools/lcc/src/main.c
|
||||
${SOURCE_DIR}/tools/lcc/src/null.c
|
||||
${SOURCE_DIR}/tools/lcc/src/output.c
|
||||
${SOURCE_DIR}/tools/lcc/src/prof.c
|
||||
${SOURCE_DIR}/tools/lcc/src/profio.c
|
||||
${SOURCE_DIR}/tools/lcc/src/simp.c
|
||||
${SOURCE_DIR}/tools/lcc/src/stmt.c
|
||||
${SOURCE_DIR}/tools/lcc/src/string.c
|
||||
${SOURCE_DIR}/tools/lcc/src/sym.c
|
||||
${SOURCE_DIR}/tools/lcc/src/symbolic.c
|
||||
${SOURCE_DIR}/tools/lcc/src/trace.c
|
||||
${SOURCE_DIR}/tools/lcc/src/tree.c
|
||||
${SOURCE_DIR}/tools/lcc/src/types.c
|
||||
)
|
||||
|
||||
set(Q3RCC_DAGCHECK_SOURCE ${SOURCE_DIR}/tools/lcc/src/dagcheck.md)
|
||||
|
||||
set(Q3CPP_SOURCES
|
||||
${SOURCE_DIR}/tools/lcc/cpp/cpp.c
|
||||
${SOURCE_DIR}/tools/lcc/cpp/lex.c
|
||||
${SOURCE_DIR}/tools/lcc/cpp/nlist.c
|
||||
${SOURCE_DIR}/tools/lcc/cpp/tokens.c
|
||||
${SOURCE_DIR}/tools/lcc/cpp/macro.c
|
||||
${SOURCE_DIR}/tools/lcc/cpp/eval.c
|
||||
${SOURCE_DIR}/tools/lcc/cpp/include.c
|
||||
${SOURCE_DIR}/tools/lcc/cpp/hideset.c
|
||||
${SOURCE_DIR}/tools/lcc/cpp/getopt.c
|
||||
${SOURCE_DIR}/tools/lcc/cpp/unix.c
|
||||
)
|
||||
|
||||
set(LBURG_SOURCES
|
||||
${SOURCE_DIR}/tools/lcc/lburg/lburg.c
|
||||
${SOURCE_DIR}/tools/lcc/lburg/gram.c
|
||||
)
|
||||
|
||||
add_executable(q3asm ${Q3ASM_SOURCES})
|
||||
set_output_dirs(q3asm)
|
||||
add_executable(q3lcc ${Q3LCC_SOURCES})
|
||||
set_output_dirs(q3lcc)
|
||||
add_dependencies(q3lcc q3rcc q3cpp)
|
||||
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID MATCHES "^(Apple)?Clang$")
|
||||
add_compile_options(-fno-strict-aliasing -Wno-unused-result
|
||||
-Wno-pointer-to-int-cast -Wno-int-to-pointer-cast)
|
||||
elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
||||
add_compile_options(/wd4311 /wd4312)
|
||||
endif()
|
||||
|
||||
add_executable(lburg ${LBURG_SOURCES})
|
||||
set_output_dirs(lburg)
|
||||
set(DAGCHECK_C ${CMAKE_BINARY_DIR}/dagcheck.c)
|
||||
add_custom_command(
|
||||
OUTPUT ${DAGCHECK_C}
|
||||
COMMAND lburg ${Q3RCC_DAGCHECK_SOURCE} ${DAGCHECK_C}
|
||||
DEPENDS lburg ${Q3RCC_DAGCHECK_SOURCE})
|
||||
|
||||
add_executable(q3rcc ${Q3RCC_SOURCES} ${DAGCHECK_C})
|
||||
set_output_dirs(q3rcc)
|
||||
target_include_directories(q3rcc PRIVATE ${SOURCE_DIR}/tools/lcc/src)
|
||||
|
||||
add_executable(q3cpp ${Q3CPP_SOURCES})
|
||||
set_output_dirs(q3cpp)
|
||||
@@ -0,0 +1,38 @@
|
||||
include_guard(GLOBAL)
|
||||
|
||||
function(add_git_dependency SOURCE_FILE)
|
||||
set(GIT_DIR ${CMAKE_SOURCE_DIR}/.git)
|
||||
if(NOT EXISTS ${GIT_DIR})
|
||||
return()
|
||||
endif()
|
||||
|
||||
# If we're a submodule, .git won't be a directory
|
||||
if(NOT IS_DIRECTORY ${GIT_DIR})
|
||||
file(READ ${GIT_DIR} GIT_FILE_CONTENT)
|
||||
string(REGEX MATCH "gitdir: (.+)" MATCHED_PATH ${GIT_FILE_CONTENT})
|
||||
if(NOT MATCHED_PATH)
|
||||
return()
|
||||
endif()
|
||||
|
||||
string(STRIP ${CMAKE_MATCH_1} GIT_DIR)
|
||||
endif()
|
||||
|
||||
set(GIT_FILES)
|
||||
list(APPEND GIT_FILES ${GIT_DIR}/HEAD)
|
||||
list(APPEND GIT_FILES ${GIT_DIR}/packed-refs)
|
||||
|
||||
file(READ ${GIT_DIR}/HEAD GIT_HEAD)
|
||||
string(REGEX MATCH "^ref: (.+)$" HAVE_REF ${GIT_HEAD})
|
||||
if(HAVE_REF)
|
||||
set(GIT_REF_PATH ${CMAKE_MATCH_1})
|
||||
string(STRIP ${GIT_REF_PATH} GIT_REF_PATH)
|
||||
list(APPEND GIT_FILES ${GIT_DIR}/${GIT_REF_PATH})
|
||||
endif()
|
||||
|
||||
foreach(GIT_FILE IN LISTS GIT_FILES)
|
||||
if(EXISTS ${GIT_FILE})
|
||||
set_source_files_properties(${SOURCE_FILE}
|
||||
PROPERTIES OBJECT_DEPENDS ${GIT_FILE})
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
@@ -0,0 +1,20 @@
|
||||
include_guard(GLOBAL)
|
||||
|
||||
set(DETECT_ARCH_C ${CMAKE_BINARY_DIR}/detect_arch.c)
|
||||
|
||||
file(WRITE ${DETECT_ARCH_C}
|
||||
"#include \"${SOURCE_DIR}/qcommon/q_platform.h\"
|
||||
#pragma message(\"@\" ARCH_STRING \"@\")
|
||||
int main(void) { return 0; }
|
||||
")
|
||||
|
||||
try_compile(COMPILE_SUCCESS
|
||||
SOURCES ${DETECT_ARCH_C}
|
||||
OUTPUT_VARIABLE COMPILE_OUTPUT)
|
||||
|
||||
string(REGEX MATCH "^[^\@]+@([a-zA-Z0-9_]+)@.*$" HAVE_MATCH ${COMPILE_OUTPUT})
|
||||
set(ARCH ${CMAKE_MATCH_1})
|
||||
|
||||
if(NOT COMPILE_SUCCESS OR NOT HAVE_MATCH OR NOT ARCH)
|
||||
message(FATAL_ERROR "Architecture detection failed: ${COMPILE_OUTPUT}")
|
||||
endif()
|
||||
@@ -0,0 +1,17 @@
|
||||
include_guard(GLOBAL)
|
||||
|
||||
function(disable_warnings)
|
||||
set(SOURCES ${ARGN})
|
||||
|
||||
foreach(FILE IN LISTS SOURCES)
|
||||
if(MSVC)
|
||||
# Annoyingly if you disable all warnings (/w) in combination with enabling
|
||||
# some warnings, which we and/or CMake inevitably do, this causes a
|
||||
# meta-warning D9025, so instead we have to individually disable them:
|
||||
set_source_files_properties(${FILE} PROPERTIES COMPILE_FLAGS
|
||||
"/wd4131 /wd4245 /wd4100 /wd4127 /wd4244 /wd4310 /wd4457 /wd4456 /wd4701 /wd4305 /wd4189 /wd4232")
|
||||
else()
|
||||
set_source_files_properties(${FILE} PROPERTIES COMPILE_FLAGS -w)
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
@@ -0,0 +1,15 @@
|
||||
include_guard(GLOBAL)
|
||||
|
||||
function(find_include_dirs OUT_VAR LIBRARY_DIR)
|
||||
# Recursively find directories that contain .h files under LIBRARY_DIR
|
||||
file(GLOB_RECURSE HEADER_FILES ${LIBRARY_DIR}/*.h)
|
||||
set(INCLUDE_DIRS "")
|
||||
foreach(HEADER_FILE IN LISTS HEADER_FILES)
|
||||
get_filename_component(HEADER_DIR ${HEADER_FILE} DIRECTORY)
|
||||
list(APPEND INCLUDE_DIRS ${HEADER_DIR})
|
||||
endforeach()
|
||||
|
||||
list(REMOVE_DUPLICATES INCLUDE_DIRS)
|
||||
|
||||
set(${OUT_VAR} ${INCLUDE_DIRS} PARENT_SCOPE)
|
||||
endfunction()
|
||||
@@ -0,0 +1,91 @@
|
||||
include_guard(GLOBAL)
|
||||
|
||||
if(NOT BUILD_GAME_QVMS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(ExternalProject)
|
||||
|
||||
set(TOOLS_DIR ${CMAKE_BINARY_DIR}/tools)
|
||||
|
||||
if(CMAKE_BUILD_TYPE)
|
||||
set(BUILD_TYPE_ARG -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
|
||||
endif()
|
||||
|
||||
set(Q3RCC ${TOOLS_DIR}/$<CONFIG>/q3rcc${HOST_EXECUTABLE_SUFFIX})
|
||||
set(Q3CPP ${TOOLS_DIR}/$<CONFIG>/q3cpp${HOST_EXECUTABLE_SUFFIX})
|
||||
set(Q3LCC ${TOOLS_DIR}/$<CONFIG>/q3lcc${HOST_EXECUTABLE_SUFFIX})
|
||||
set(Q3ASM ${TOOLS_DIR}/$<CONFIG>/q3asm${HOST_EXECUTABLE_SUFFIX})
|
||||
|
||||
ExternalProject_Add(qvm_tools
|
||||
SOURCE_DIR ${CMAKE_SOURCE_DIR}/cmake/tools
|
||||
BINARY_DIR ${TOOLS_DIR}
|
||||
CMAKE_ARGS
|
||||
-DSOURCE_DIR=${SOURCE_DIR}
|
||||
-DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}
|
||||
-DCMAKE_MINIMUM_REQUIRED_VERSION=${CMAKE_MINIMUM_REQUIRED_VERSION}
|
||||
${BUILD_TYPE_ARG}
|
||||
BUILD_ALWAYS TRUE
|
||||
BUILD_BYPRODUCTS ${Q3RCC} ${Q3CPP} ${Q3LCC} ${Q3ASM}
|
||||
INSTALL_COMMAND "")
|
||||
|
||||
function(add_qvm MODULE_NAME)
|
||||
list(REMOVE_AT ARGV 0)
|
||||
cmake_parse_arguments(ARG "" "" "DEFINITIONS;OUTPUT_NAME;OUTPUT_DIRECTORY;SOURCES" ${ARGV})
|
||||
|
||||
set(QVM_OUTPUT_DIR ${CMAKE_BINARY_DIR}/$<CONFIG>)
|
||||
if(ARG_OUTPUT_DIRECTORY)
|
||||
set(QVM_OUTPUT_DIR ${QVM_OUTPUT_DIR}/${ARG_OUTPUT_DIRECTORY})
|
||||
endif()
|
||||
add_custom_command(
|
||||
OUTPUT ${QVM_OUTPUT_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${QVM_OUTPUT_DIR})
|
||||
|
||||
if(ARG_OUTPUT_NAME)
|
||||
set(QVM_FILE ${QVM_OUTPUT_DIR}/${ARG_OUTPUT_NAME}.qvm)
|
||||
else()
|
||||
set(QVM_FILE ${QVM_OUTPUT_DIR}/${MODULE_NAME}.qvm)
|
||||
endif()
|
||||
|
||||
set(QVM_ASM_DIR ${CMAKE_BINARY_DIR}/qvm.dir/${MODULE_NAME})
|
||||
file(MAKE_DIRECTORY ${QVM_ASM_DIR})
|
||||
|
||||
set(LCC_FLAGS "")
|
||||
foreach(DEFINITION IN LISTS ARG_DEFINITIONS)
|
||||
list(APPEND LCC_FLAGS "-D${DEFINITION}")
|
||||
endforeach()
|
||||
|
||||
set(ASM_FILES "")
|
||||
foreach(SOURCE ${ARG_SOURCES})
|
||||
if(${SOURCE} MATCHES "\\.asm$")
|
||||
list(APPEND ASM_FILES ${SOURCE})
|
||||
continue()
|
||||
endif()
|
||||
|
||||
get_filename_component(BASE_FILE ${SOURCE} NAME_WE)
|
||||
set(ASM_FILE ${QVM_ASM_DIR}/${BASE_FILE}.asm)
|
||||
string(REPLACE "${CMAKE_BINARY_DIR}/" "" ASM_FILE_COMMENT ${ASM_FILE})
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${ASM_FILE}
|
||||
COMMAND ${Q3LCC} ${LCC_FLAGS} -o ${ASM_FILE} ${SOURCE}
|
||||
DEPENDS ${SOURCE} qvm_tools ${Q3RCC} ${Q3CPP} ${Q3LCC}
|
||||
COMMENT "Building C object ${ASM_FILE_COMMENT}")
|
||||
|
||||
list(APPEND ASM_FILES ${ASM_FILE})
|
||||
endforeach()
|
||||
|
||||
string(REPLACE "${CMAKE_BINARY_DIR}/" "" QVM_FILE_COMMENT ${QVM_FILE})
|
||||
add_custom_command(
|
||||
OUTPUT ${QVM_FILE}
|
||||
COMMAND ${Q3ASM} -o ${QVM_FILE} ${ASM_FILES}
|
||||
DEPENDS ${ASM_FILES} qvm_tools ${Q3ASM}
|
||||
COMMENT "Linking C QVM library ${QVM_FILE_COMMENT}")
|
||||
|
||||
string(REGEX REPLACE "[^A-Za-z0-9]" "_" TARGET_NAME ${MODULE_NAME})
|
||||
add_custom_target(${TARGET_NAME} ALL DEPENDS ${QVM_FILE})
|
||||
|
||||
if(ARG_OUTPUT_DIRECTORY)
|
||||
install(FILES ${QVM_FILE} DESTINATION ${ARG_OUTPUT_DIRECTORY})
|
||||
endif()
|
||||
endfunction()
|
||||
@@ -0,0 +1,26 @@
|
||||
include_guard(GLOBAL)
|
||||
|
||||
function(set_output_dirs TARGET)
|
||||
list(REMOVE_AT ARGV 0)
|
||||
cmake_parse_arguments(ARG "" "" "SUBDIRECTORY" ${ARGV})
|
||||
|
||||
if(CMAKE_CONFIGURATION_TYPES) # Multi-config
|
||||
set(CONFIGS ${CMAKE_CONFIGURATION_TYPES})
|
||||
else() # Single-config
|
||||
set(CONFIGS ${CMAKE_BUILD_TYPE})
|
||||
endif()
|
||||
|
||||
foreach(CONFIG ${CONFIGS})
|
||||
string(TOUPPER ${CONFIG} CONFIG_UPPER)
|
||||
|
||||
set(OUT_DIR ${CMAKE_BINARY_DIR}/${CONFIG}/${ARG_SUBDIRECTORY})
|
||||
|
||||
set_target_properties(${TARGET} PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY_${CONFIG_UPPER} ${OUT_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_${CONFIG_UPPER} ${OUT_DIR}
|
||||
ARCHIVE_OUTPUT_DIRECTORY_${CONFIG_UPPER} ${OUT_DIR})
|
||||
endforeach()
|
||||
|
||||
set_target_properties(${TARGET} PROPERTIES
|
||||
INSTALL_DESTINATION ./${ARG_SUBDIRECTORY})
|
||||
endfunction()
|
||||
@@ -0,0 +1,13 @@
|
||||
# Convert a shader file to a compilable C file
|
||||
|
||||
# INPUT_FILE, OUTPUT_FILE, SHADER_NAME must be set via -D
|
||||
|
||||
file(READ ${INPUT_FILE} CONTENTS)
|
||||
|
||||
string(REPLACE "\\" "\\\\" CONTENTS "${CONTENTS}") # Escape backslashes
|
||||
string(REPLACE "\"" "\\\"" CONTENTS "${CONTENTS}") # Escape double quotes
|
||||
string(REPLACE "\n" "\\n\"\n\"" CONTENTS "${CONTENTS}") # Escape newlines
|
||||
|
||||
set(OUTPUT_CONTENT "const char *fallbackShader_${SHADER_NAME} =\n\"${CONTENTS}\";\n")
|
||||
|
||||
file(WRITE ${OUTPUT_FILE} "${OUTPUT_CONTENT}")
|
||||
@@ -1,5 +1,3 @@
|
||||
add_library(qcommon_version INTERFACE)
|
||||
|
||||
execute_process(
|
||||
COMMAND git rev-parse --is-inside-work-tree
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
@@ -64,5 +62,8 @@ message(VERBOSE "Git revision date: ${GIT_REVISION_DATE}")
|
||||
message(VERBOSE "Git revision build: ${GIT_REVISION_BUILD_NUMBER}")
|
||||
message(VERBOSE "Stage: ${PRODUCT_VERSION_STAGE}")
|
||||
|
||||
configure_file("q_version.generated.h.in" "generated/q_version.generated.h")
|
||||
target_include_directories(qcommon_version INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/generated")
|
||||
configure_file("cmake/q_version.generated.h.in" "${CMAKE_CURRENT_BINARY_DIR}/generated/q_version.generated.h")
|
||||
|
||||
list(APPEND CLIENT_INCLUDE_DIRS "${CMAKE_CURRENT_BINARY_DIR}/generated")
|
||||
list(APPEND SERVER_INCLUDE_DIRS "${CMAKE_CURRENT_BINARY_DIR}/generated")
|
||||
list(APPEND RENDERER_INCLUDE_DIRS "${CMAKE_CURRENT_BINARY_DIR}/generated")
|
||||
@@ -1,5 +0,0 @@
|
||||
This file identifies the version of the AL headers in this directory. If you
|
||||
change or update the AL headers in any way, please make sure you also update
|
||||
this file.
|
||||
|
||||
openal-soft-1.15.1
|
||||
-355
@@ -1,355 +0,0 @@
|
||||
/**
|
||||
* OpenAL cross platform audio library
|
||||
* Copyright (C) 2008 by authors.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
* Or go to http://www.gnu.org/copyleft/lgpl.html
|
||||
*/
|
||||
|
||||
#ifndef AL_ALEXT_H
|
||||
#define AL_ALEXT_H
|
||||
|
||||
#include <stddef.h>
|
||||
/* Define int64_t and uint64_t types */
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#include <inttypes.h>
|
||||
#elif defined(_WIN32) && defined(__GNUC__)
|
||||
#include <stdint.h>
|
||||
#elif defined(_WIN32)
|
||||
typedef __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#else
|
||||
/* Fallback if nothing above works */
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
|
||||
#include "alc.h"
|
||||
#include "al.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef AL_LOKI_IMA_ADPCM_format
|
||||
#define AL_LOKI_IMA_ADPCM_format 1
|
||||
#define AL_FORMAT_IMA_ADPCM_MONO16_EXT 0x10000
|
||||
#define AL_FORMAT_IMA_ADPCM_STEREO16_EXT 0x10001
|
||||
#endif
|
||||
|
||||
#ifndef AL_LOKI_WAVE_format
|
||||
#define AL_LOKI_WAVE_format 1
|
||||
#define AL_FORMAT_WAVE_EXT 0x10002
|
||||
#endif
|
||||
|
||||
#ifndef AL_EXT_vorbis
|
||||
#define AL_EXT_vorbis 1
|
||||
#define AL_FORMAT_VORBIS_EXT 0x10003
|
||||
#endif
|
||||
|
||||
#ifndef AL_LOKI_quadriphonic
|
||||
#define AL_LOKI_quadriphonic 1
|
||||
#define AL_FORMAT_QUAD8_LOKI 0x10004
|
||||
#define AL_FORMAT_QUAD16_LOKI 0x10005
|
||||
#endif
|
||||
|
||||
#ifndef AL_EXT_float32
|
||||
#define AL_EXT_float32 1
|
||||
#define AL_FORMAT_MONO_FLOAT32 0x10010
|
||||
#define AL_FORMAT_STEREO_FLOAT32 0x10011
|
||||
#endif
|
||||
|
||||
#ifndef AL_EXT_double
|
||||
#define AL_EXT_double 1
|
||||
#define AL_FORMAT_MONO_DOUBLE_EXT 0x10012
|
||||
#define AL_FORMAT_STEREO_DOUBLE_EXT 0x10013
|
||||
#endif
|
||||
|
||||
#ifndef AL_EXT_MULAW
|
||||
#define AL_EXT_MULAW 1
|
||||
#define AL_FORMAT_MONO_MULAW_EXT 0x10014
|
||||
#define AL_FORMAT_STEREO_MULAW_EXT 0x10015
|
||||
#endif
|
||||
|
||||
#ifndef AL_EXT_ALAW
|
||||
#define AL_EXT_ALAW 1
|
||||
#define AL_FORMAT_MONO_ALAW_EXT 0x10016
|
||||
#define AL_FORMAT_STEREO_ALAW_EXT 0x10017
|
||||
#endif
|
||||
|
||||
#ifndef ALC_LOKI_audio_channel
|
||||
#define ALC_LOKI_audio_channel 1
|
||||
#define ALC_CHAN_MAIN_LOKI 0x500001
|
||||
#define ALC_CHAN_PCM_LOKI 0x500002
|
||||
#define ALC_CHAN_CD_LOKI 0x500003
|
||||
#endif
|
||||
|
||||
#ifndef AL_EXT_MCFORMATS
|
||||
#define AL_EXT_MCFORMATS 1
|
||||
#define AL_FORMAT_QUAD8 0x1204
|
||||
#define AL_FORMAT_QUAD16 0x1205
|
||||
#define AL_FORMAT_QUAD32 0x1206
|
||||
#define AL_FORMAT_REAR8 0x1207
|
||||
#define AL_FORMAT_REAR16 0x1208
|
||||
#define AL_FORMAT_REAR32 0x1209
|
||||
#define AL_FORMAT_51CHN8 0x120A
|
||||
#define AL_FORMAT_51CHN16 0x120B
|
||||
#define AL_FORMAT_51CHN32 0x120C
|
||||
#define AL_FORMAT_61CHN8 0x120D
|
||||
#define AL_FORMAT_61CHN16 0x120E
|
||||
#define AL_FORMAT_61CHN32 0x120F
|
||||
#define AL_FORMAT_71CHN8 0x1210
|
||||
#define AL_FORMAT_71CHN16 0x1211
|
||||
#define AL_FORMAT_71CHN32 0x1212
|
||||
#endif
|
||||
|
||||
#ifndef AL_EXT_MULAW_MCFORMATS
|
||||
#define AL_EXT_MULAW_MCFORMATS 1
|
||||
#define AL_FORMAT_MONO_MULAW 0x10014
|
||||
#define AL_FORMAT_STEREO_MULAW 0x10015
|
||||
#define AL_FORMAT_QUAD_MULAW 0x10021
|
||||
#define AL_FORMAT_REAR_MULAW 0x10022
|
||||
#define AL_FORMAT_51CHN_MULAW 0x10023
|
||||
#define AL_FORMAT_61CHN_MULAW 0x10024
|
||||
#define AL_FORMAT_71CHN_MULAW 0x10025
|
||||
#endif
|
||||
|
||||
#ifndef AL_EXT_IMA4
|
||||
#define AL_EXT_IMA4 1
|
||||
#define AL_FORMAT_MONO_IMA4 0x1300
|
||||
#define AL_FORMAT_STEREO_IMA4 0x1301
|
||||
#endif
|
||||
|
||||
#ifndef AL_EXT_STATIC_BUFFER
|
||||
#define AL_EXT_STATIC_BUFFER 1
|
||||
typedef ALvoid (AL_APIENTRY*PFNALBUFFERDATASTATICPROC)(const ALint,ALenum,ALvoid*,ALsizei,ALsizei);
|
||||
#ifdef AL_ALEXT_PROTOTYPES
|
||||
AL_API ALvoid AL_APIENTRY alBufferDataStatic(const ALint buffer, ALenum format, ALvoid *data, ALsizei len, ALsizei freq);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef ALC_EXT_EFX
|
||||
#define ALC_EXT_EFX 1
|
||||
#include "efx.h"
|
||||
#endif
|
||||
|
||||
#ifndef ALC_EXT_disconnect
|
||||
#define ALC_EXT_disconnect 1
|
||||
#define ALC_CONNECTED 0x313
|
||||
#endif
|
||||
|
||||
#ifndef ALC_EXT_thread_local_context
|
||||
#define ALC_EXT_thread_local_context 1
|
||||
typedef ALCboolean (ALC_APIENTRY*PFNALCSETTHREADCONTEXTPROC)(ALCcontext *context);
|
||||
typedef ALCcontext* (ALC_APIENTRY*PFNALCGETTHREADCONTEXTPROC)(void);
|
||||
#ifdef AL_ALEXT_PROTOTYPES
|
||||
ALC_API ALCboolean ALC_APIENTRY alcSetThreadContext(ALCcontext *context);
|
||||
ALC_API ALCcontext* ALC_APIENTRY alcGetThreadContext(void);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef AL_EXT_source_distance_model
|
||||
#define AL_EXT_source_distance_model 1
|
||||
#define AL_SOURCE_DISTANCE_MODEL 0x200
|
||||
#endif
|
||||
|
||||
#ifndef AL_SOFT_buffer_sub_data
|
||||
#define AL_SOFT_buffer_sub_data 1
|
||||
#define AL_BYTE_RW_OFFSETS_SOFT 0x1031
|
||||
#define AL_SAMPLE_RW_OFFSETS_SOFT 0x1032
|
||||
typedef ALvoid (AL_APIENTRY*PFNALBUFFERSUBDATASOFTPROC)(ALuint,ALenum,const ALvoid*,ALsizei,ALsizei);
|
||||
#ifdef AL_ALEXT_PROTOTYPES
|
||||
AL_API ALvoid AL_APIENTRY alBufferSubDataSOFT(ALuint buffer,ALenum format,const ALvoid *data,ALsizei offset,ALsizei length);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef AL_SOFT_loop_points
|
||||
#define AL_SOFT_loop_points 1
|
||||
#define AL_LOOP_POINTS_SOFT 0x2015
|
||||
#endif
|
||||
|
||||
#ifndef AL_EXT_FOLDBACK
|
||||
#define AL_EXT_FOLDBACK 1
|
||||
#define AL_EXT_FOLDBACK_NAME "AL_EXT_FOLDBACK"
|
||||
#define AL_FOLDBACK_EVENT_BLOCK 0x4112
|
||||
#define AL_FOLDBACK_EVENT_START 0x4111
|
||||
#define AL_FOLDBACK_EVENT_STOP 0x4113
|
||||
#define AL_FOLDBACK_MODE_MONO 0x4101
|
||||
#define AL_FOLDBACK_MODE_STEREO 0x4102
|
||||
typedef void (AL_APIENTRY*LPALFOLDBACKCALLBACK)(ALenum,ALsizei);
|
||||
typedef void (AL_APIENTRY*LPALREQUESTFOLDBACKSTART)(ALenum,ALsizei,ALsizei,ALfloat*,LPALFOLDBACKCALLBACK);
|
||||
typedef void (AL_APIENTRY*LPALREQUESTFOLDBACKSTOP)(void);
|
||||
#ifdef AL_ALEXT_PROTOTYPES
|
||||
AL_API void AL_APIENTRY alRequestFoldbackStart(ALenum mode,ALsizei count,ALsizei length,ALfloat *mem,LPALFOLDBACKCALLBACK callback);
|
||||
AL_API void AL_APIENTRY alRequestFoldbackStop(void);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef ALC_EXT_DEDICATED
|
||||
#define ALC_EXT_DEDICATED 1
|
||||
#define AL_DEDICATED_GAIN 0x0001
|
||||
#define AL_EFFECT_DEDICATED_DIALOGUE 0x9001
|
||||
#define AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT 0x9000
|
||||
#endif
|
||||
|
||||
#ifndef AL_SOFT_buffer_samples
|
||||
#define AL_SOFT_buffer_samples 1
|
||||
/* Channel configurations */
|
||||
#define AL_MONO_SOFT 0x1500
|
||||
#define AL_STEREO_SOFT 0x1501
|
||||
#define AL_REAR_SOFT 0x1502
|
||||
#define AL_QUAD_SOFT 0x1503
|
||||
#define AL_5POINT1_SOFT 0x1504
|
||||
#define AL_6POINT1_SOFT 0x1505
|
||||
#define AL_7POINT1_SOFT 0x1506
|
||||
|
||||
/* Sample types */
|
||||
#define AL_BYTE_SOFT 0x1400
|
||||
#define AL_UNSIGNED_BYTE_SOFT 0x1401
|
||||
#define AL_SHORT_SOFT 0x1402
|
||||
#define AL_UNSIGNED_SHORT_SOFT 0x1403
|
||||
#define AL_INT_SOFT 0x1404
|
||||
#define AL_UNSIGNED_INT_SOFT 0x1405
|
||||
#define AL_FLOAT_SOFT 0x1406
|
||||
#define AL_DOUBLE_SOFT 0x1407
|
||||
#define AL_BYTE3_SOFT 0x1408
|
||||
#define AL_UNSIGNED_BYTE3_SOFT 0x1409
|
||||
|
||||
/* Storage formats */
|
||||
#define AL_MONO8_SOFT 0x1100
|
||||
#define AL_MONO16_SOFT 0x1101
|
||||
#define AL_MONO32F_SOFT 0x10010
|
||||
#define AL_STEREO8_SOFT 0x1102
|
||||
#define AL_STEREO16_SOFT 0x1103
|
||||
#define AL_STEREO32F_SOFT 0x10011
|
||||
#define AL_QUAD8_SOFT 0x1204
|
||||
#define AL_QUAD16_SOFT 0x1205
|
||||
#define AL_QUAD32F_SOFT 0x1206
|
||||
#define AL_REAR8_SOFT 0x1207
|
||||
#define AL_REAR16_SOFT 0x1208
|
||||
#define AL_REAR32F_SOFT 0x1209
|
||||
#define AL_5POINT1_8_SOFT 0x120A
|
||||
#define AL_5POINT1_16_SOFT 0x120B
|
||||
#define AL_5POINT1_32F_SOFT 0x120C
|
||||
#define AL_6POINT1_8_SOFT 0x120D
|
||||
#define AL_6POINT1_16_SOFT 0x120E
|
||||
#define AL_6POINT1_32F_SOFT 0x120F
|
||||
#define AL_7POINT1_8_SOFT 0x1210
|
||||
#define AL_7POINT1_16_SOFT 0x1211
|
||||
#define AL_7POINT1_32F_SOFT 0x1212
|
||||
|
||||
/* Buffer attributes */
|
||||
#define AL_INTERNAL_FORMAT_SOFT 0x2008
|
||||
#define AL_BYTE_LENGTH_SOFT 0x2009
|
||||
#define AL_SAMPLE_LENGTH_SOFT 0x200A
|
||||
#define AL_SEC_LENGTH_SOFT 0x200B
|
||||
|
||||
typedef void (AL_APIENTRY*LPALBUFFERSAMPLESSOFT)(ALuint,ALuint,ALenum,ALsizei,ALenum,ALenum,const ALvoid*);
|
||||
typedef void (AL_APIENTRY*LPALBUFFERSUBSAMPLESSOFT)(ALuint,ALsizei,ALsizei,ALenum,ALenum,const ALvoid*);
|
||||
typedef void (AL_APIENTRY*LPALGETBUFFERSAMPLESSOFT)(ALuint,ALsizei,ALsizei,ALenum,ALenum,ALvoid*);
|
||||
typedef ALboolean (AL_APIENTRY*LPALISBUFFERFORMATSUPPORTEDSOFT)(ALenum);
|
||||
#ifdef AL_ALEXT_PROTOTYPES
|
||||
AL_API void AL_APIENTRY alBufferSamplesSOFT(ALuint buffer, ALuint samplerate, ALenum internalformat, ALsizei samples, ALenum channels, ALenum type, const ALvoid *data);
|
||||
AL_API void AL_APIENTRY alBufferSubSamplesSOFT(ALuint buffer, ALsizei offset, ALsizei samples, ALenum channels, ALenum type, const ALvoid *data);
|
||||
AL_API void AL_APIENTRY alGetBufferSamplesSOFT(ALuint buffer, ALsizei offset, ALsizei samples, ALenum channels, ALenum type, ALvoid *data);
|
||||
AL_API ALboolean AL_APIENTRY alIsBufferFormatSupportedSOFT(ALenum format);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef AL_SOFT_direct_channels
|
||||
#define AL_SOFT_direct_channels 1
|
||||
#define AL_DIRECT_CHANNELS_SOFT 0x1033
|
||||
#endif
|
||||
|
||||
#ifndef ALC_SOFT_loopback
|
||||
#define ALC_SOFT_loopback 1
|
||||
#define ALC_FORMAT_CHANNELS_SOFT 0x1990
|
||||
#define ALC_FORMAT_TYPE_SOFT 0x1991
|
||||
|
||||
/* Sample types */
|
||||
#define ALC_BYTE_SOFT 0x1400
|
||||
#define ALC_UNSIGNED_BYTE_SOFT 0x1401
|
||||
#define ALC_SHORT_SOFT 0x1402
|
||||
#define ALC_UNSIGNED_SHORT_SOFT 0x1403
|
||||
#define ALC_INT_SOFT 0x1404
|
||||
#define ALC_UNSIGNED_INT_SOFT 0x1405
|
||||
#define ALC_FLOAT_SOFT 0x1406
|
||||
|
||||
/* Channel configurations */
|
||||
#define ALC_MONO_SOFT 0x1500
|
||||
#define ALC_STEREO_SOFT 0x1501
|
||||
#define ALC_QUAD_SOFT 0x1503
|
||||
#define ALC_5POINT1_SOFT 0x1504
|
||||
#define ALC_6POINT1_SOFT 0x1505
|
||||
#define ALC_7POINT1_SOFT 0x1506
|
||||
|
||||
typedef ALCdevice* (ALC_APIENTRY*LPALCLOOPBACKOPENDEVICESOFT)(const ALCchar*);
|
||||
typedef ALCboolean (ALC_APIENTRY*LPALCISRENDERFORMATSUPPORTEDSOFT)(ALCdevice*,ALCsizei,ALCenum,ALCenum);
|
||||
typedef void (ALC_APIENTRY*LPALCRENDERSAMPLESSOFT)(ALCdevice*,ALCvoid*,ALCsizei);
|
||||
#ifdef AL_ALEXT_PROTOTYPES
|
||||
ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceName);
|
||||
ALC_API ALCboolean ALC_APIENTRY alcIsRenderFormatSupportedSOFT(ALCdevice *device, ALCsizei freq, ALCenum channels, ALCenum type);
|
||||
ALC_API void ALC_APIENTRY alcRenderSamplesSOFT(ALCdevice *device, ALCvoid *buffer, ALCsizei samples);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef AL_EXT_STEREO_ANGLES
|
||||
#define AL_EXT_STEREO_ANGLES 1
|
||||
#define AL_STEREO_ANGLES 0x1030
|
||||
#endif
|
||||
|
||||
#ifndef AL_EXT_SOURCE_RADIUS
|
||||
#define AL_EXT_SOURCE_RADIUS 1
|
||||
#define AL_SOURCE_RADIUS 0x1031
|
||||
#endif
|
||||
|
||||
#ifndef AL_SOFT_source_latency
|
||||
#define AL_SOFT_source_latency 1
|
||||
#define AL_SAMPLE_OFFSET_LATENCY_SOFT 0x1200
|
||||
#define AL_SEC_OFFSET_LATENCY_SOFT 0x1201
|
||||
typedef int64_t ALint64SOFT;
|
||||
typedef uint64_t ALuint64SOFT;
|
||||
typedef void (AL_APIENTRY*LPALSOURCEDSOFT)(ALuint,ALenum,ALdouble);
|
||||
typedef void (AL_APIENTRY*LPALSOURCE3DSOFT)(ALuint,ALenum,ALdouble,ALdouble,ALdouble);
|
||||
typedef void (AL_APIENTRY*LPALSOURCEDVSOFT)(ALuint,ALenum,const ALdouble*);
|
||||
typedef void (AL_APIENTRY*LPALGETSOURCEDSOFT)(ALuint,ALenum,ALdouble*);
|
||||
typedef void (AL_APIENTRY*LPALGETSOURCE3DSOFT)(ALuint,ALenum,ALdouble*,ALdouble*,ALdouble*);
|
||||
typedef void (AL_APIENTRY*LPALGETSOURCEDVSOFT)(ALuint,ALenum,ALdouble*);
|
||||
typedef void (AL_APIENTRY*LPALSOURCEI64SOFT)(ALuint,ALenum,ALint64SOFT);
|
||||
typedef void (AL_APIENTRY*LPALSOURCE3I64SOFT)(ALuint,ALenum,ALint64SOFT,ALint64SOFT,ALint64SOFT);
|
||||
typedef void (AL_APIENTRY*LPALSOURCEI64VSOFT)(ALuint,ALenum,const ALint64SOFT*);
|
||||
typedef void (AL_APIENTRY*LPALGETSOURCEI64SOFT)(ALuint,ALenum,ALint64SOFT*);
|
||||
typedef void (AL_APIENTRY*LPALGETSOURCE3I64SOFT)(ALuint,ALenum,ALint64SOFT*,ALint64SOFT*,ALint64SOFT*);
|
||||
typedef void (AL_APIENTRY*LPALGETSOURCEI64VSOFT)(ALuint,ALenum,ALint64SOFT*);
|
||||
#ifdef AL_ALEXT_PROTOTYPES
|
||||
AL_API void AL_APIENTRY alSourcedSOFT(ALuint source, ALenum param, ALdouble value);
|
||||
AL_API void AL_APIENTRY alSource3dSOFT(ALuint source, ALenum param, ALdouble value1, ALdouble value2, ALdouble value3);
|
||||
AL_API void AL_APIENTRY alSourcedvSOFT(ALuint source, ALenum param, const ALdouble *values);
|
||||
AL_API void AL_APIENTRY alGetSourcedSOFT(ALuint source, ALenum param, ALdouble *value);
|
||||
AL_API void AL_APIENTRY alGetSource3dSOFT(ALuint source, ALenum param, ALdouble *value1, ALdouble *value2, ALdouble *value3);
|
||||
AL_API void AL_APIENTRY alGetSourcedvSOFT(ALuint source, ALenum param, ALdouble *values);
|
||||
AL_API void AL_APIENTRY alSourcei64SOFT(ALuint source, ALenum param, ALint64SOFT value);
|
||||
AL_API void AL_APIENTRY alSource3i64SOFT(ALuint source, ALenum param, ALint64SOFT value1, ALint64SOFT value2, ALint64SOFT value3);
|
||||
AL_API void AL_APIENTRY alSourcei64vSOFT(ALuint source, ALenum param, const ALint64SOFT *values);
|
||||
AL_API void AL_APIENTRY alGetSourcei64SOFT(ALuint source, ALenum param, ALint64SOFT *value);
|
||||
AL_API void AL_APIENTRY alGetSource3i64SOFT(ALuint source, ALenum param, ALint64SOFT *value1, ALint64SOFT *value2, ALint64SOFT *value3);
|
||||
AL_API void AL_APIENTRY alGetSourcei64vSOFT(ALuint source, ALenum param, ALint64SOFT *values);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2024 the OpenMoHAA team
|
||||
Copyright (C) 2025 the OpenMoHAA team
|
||||
|
||||
This file is part of OpenMoHAA source code.
|
||||
|
||||
@@ -22,11 +22,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
// launch.h: Base interface for starting programs
|
||||
|
||||
#include "q_platform.h"
|
||||
#include "../qcommon/q_platform.h"
|
||||
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
std::filesystem::path GetProgramLocation();
|
||||
void LaunchProgram(const std::filesystem::path& path, const std::vector<std::string>& argumentList);
|
||||
void LaunchProgram(const std::filesystem::path& path, const std::vector<std::string>& argumentList);
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2024 the OpenMoHAA team
|
||||
Copyright (C) 2025 the OpenMoHAA team
|
||||
|
||||
This file is part of OpenMoHAA source code.
|
||||
|
||||
@@ -32,11 +32,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
extern "C" char** environ;
|
||||
extern "C" char **environ;
|
||||
|
||||
std::filesystem::path GetProgramLocation()
|
||||
{
|
||||
char path[FILENAME_MAX];
|
||||
char path[FILENAME_MAX];
|
||||
ssize_t count = readlink("/proc/self/exe", path, FILENAME_MAX);
|
||||
|
||||
return std::filesystem::path(std::string(path, (count > 0) ? count : 0)).parent_path();
|
||||
@@ -44,17 +44,17 @@ std::filesystem::path GetProgramLocation()
|
||||
|
||||
void LaunchProgram(const std::filesystem::path& path, const std::vector<std::string>& argumentList)
|
||||
{
|
||||
pid_t pid;
|
||||
pid_t pid;
|
||||
std::string pathString = path.string();
|
||||
size_t argCount = argumentList.size();
|
||||
char** argv;
|
||||
int status;
|
||||
size_t argCount = argumentList.size();
|
||||
char **argv;
|
||||
int status;
|
||||
|
||||
argv = new char*[argCount + 2];
|
||||
argv[0] = (char*)pathString.c_str();
|
||||
argv = new char *[argCount + 2];
|
||||
argv[0] = (char *)pathString.c_str();
|
||||
|
||||
for (size_t i = 0; i < argCount; i++) {
|
||||
argv[i + 1] = (char*)argumentList[i].c_str();
|
||||
argv[i + 1] = (char *)argumentList[i].c_str();
|
||||
}
|
||||
argv[argCount + 1] = NULL;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2024 the OpenMoHAA team
|
||||
Copyright (C) 2025 the OpenMoHAA team
|
||||
|
||||
This file is part of OpenMoHAA source code.
|
||||
|
||||
@@ -28,19 +28,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
const char* targetGameList[] =
|
||||
{
|
||||
"Base",
|
||||
"Spearhead",
|
||||
"Breakthrough"
|
||||
};
|
||||
const char *targetGameList[] = {"Base", "Spearhead", "Breakthrough"};
|
||||
|
||||
int main(int argc, const char* argv[]) {
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
std::vector<std::string> argumentList;
|
||||
#if !defined(DEDICATED) || !DEDICATED
|
||||
const char* programName = "openmohaa" ARCH_SUFFIX DLL_SUFFIX EXE_EXT;
|
||||
const char *programName = "openmohaa" DLL_SUFFIX EXE_EXT;
|
||||
#else
|
||||
const char* programName = "omohaaded" ARCH_SUFFIX DLL_SUFFIX EXE_EXT;
|
||||
const char *programName = "omohaaded" DLL_SUFFIX EXE_EXT;
|
||||
#endif
|
||||
|
||||
argumentList.push_back("+set");
|
||||
@@ -56,7 +52,7 @@ int main(int argc, const char* argv[]) {
|
||||
std::cout << "Expected program name: " << programName << std::endl;
|
||||
|
||||
const std::filesystem::path programLocation = GetProgramLocation();
|
||||
const std::filesystem::path programPath = programLocation / programName;
|
||||
const std::filesystem::path programPath = programLocation / programName;
|
||||
|
||||
std::cout << "Program location: " << programLocation << std::endl;
|
||||
std::cout << "Expected path: " << programPath << std::endl;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2024 the OpenMoHAA team
|
||||
Copyright (C) 2025 the OpenMoHAA team
|
||||
|
||||
This file is part of OpenMoHAA source code.
|
||||
|
||||
@@ -30,7 +30,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
std::filesystem::path GetProgramLocation()
|
||||
{
|
||||
wchar_t path[FILENAME_MAX] = { 0 };
|
||||
wchar_t path[FILENAME_MAX] = {0};
|
||||
GetModuleFileNameW(nullptr, path, FILENAME_MAX);
|
||||
|
||||
return std::filesystem::path(path).parent_path();
|
||||
@@ -39,11 +39,11 @@ std::filesystem::path GetProgramLocation()
|
||||
void LaunchProgram(const std::filesystem::path& path, const std::vector<std::string>& argumentList)
|
||||
{
|
||||
PROCESS_INFORMATION processInfo;
|
||||
STARTUPINFOW startupInfo;
|
||||
BOOL returnValue;
|
||||
std::wstring osCommandLine;
|
||||
std::wstring commandLine;
|
||||
size_t argCount = argumentList.size();
|
||||
STARTUPINFOW startupInfo;
|
||||
BOOL returnValue;
|
||||
std::wstring osCommandLine;
|
||||
std::wstring commandLine;
|
||||
size_t argCount = argumentList.size();
|
||||
|
||||
memset(&processInfo, 0, sizeof(processInfo));
|
||||
memset(&startupInfo, 0, sizeof(startupInfo));
|
||||
@@ -58,7 +58,7 @@ void LaunchProgram(const std::filesystem::path& path, const std::vector<std::str
|
||||
}
|
||||
}
|
||||
|
||||
osCommandLine = path.wstring();
|
||||
osCommandLine = L"\"" + path.wstring() + L"\"";
|
||||
osCommandLine += L" ";
|
||||
osCommandLine += commandLine;
|
||||
|
||||
|
||||
@@ -1,232 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL.h
|
||||
*
|
||||
* Main include header for the SDL library
|
||||
*/
|
||||
|
||||
|
||||
#ifndef SDL_h_
|
||||
#define SDL_h_
|
||||
|
||||
#include "SDL_main.h"
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_assert.h"
|
||||
#include "SDL_atomic.h"
|
||||
#include "SDL_audio.h"
|
||||
#include "SDL_clipboard.h"
|
||||
#include "SDL_cpuinfo.h"
|
||||
#include "SDL_endian.h"
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_events.h"
|
||||
#include "SDL_filesystem.h"
|
||||
#include "SDL_gamecontroller.h"
|
||||
#include "SDL_haptic.h"
|
||||
#include "SDL_hidapi.h"
|
||||
#include "SDL_hints.h"
|
||||
#include "SDL_joystick.h"
|
||||
#include "SDL_loadso.h"
|
||||
#include "SDL_log.h"
|
||||
#include "SDL_messagebox.h"
|
||||
#include "SDL_metal.h"
|
||||
#include "SDL_mutex.h"
|
||||
#include "SDL_power.h"
|
||||
#include "SDL_render.h"
|
||||
#include "SDL_rwops.h"
|
||||
#include "SDL_sensor.h"
|
||||
#include "SDL_shape.h"
|
||||
#include "SDL_system.h"
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_timer.h"
|
||||
#include "SDL_version.h"
|
||||
#include "SDL_video.h"
|
||||
#include "SDL_locale.h"
|
||||
#include "SDL_misc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* As of version 0.5, SDL is loaded dynamically into the application */
|
||||
|
||||
/**
|
||||
* \name SDL_INIT_*
|
||||
*
|
||||
* These are the flags which may be passed to SDL_Init(). You should
|
||||
* specify the subsystems which you will be using in your application.
|
||||
*/
|
||||
/* @{ */
|
||||
#define SDL_INIT_TIMER 0x00000001u
|
||||
#define SDL_INIT_AUDIO 0x00000010u
|
||||
#define SDL_INIT_VIDEO 0x00000020u /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
|
||||
#define SDL_INIT_JOYSTICK 0x00000200u /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
|
||||
#define SDL_INIT_HAPTIC 0x00001000u
|
||||
#define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
|
||||
#define SDL_INIT_EVENTS 0x00004000u
|
||||
#define SDL_INIT_SENSOR 0x00008000u
|
||||
#define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */
|
||||
#define SDL_INIT_EVERYTHING ( \
|
||||
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
|
||||
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \
|
||||
)
|
||||
/* @} */
|
||||
|
||||
/**
|
||||
* Initialize the SDL library.
|
||||
*
|
||||
* SDL_Init() simply forwards to calling SDL_InitSubSystem(). Therefore, the
|
||||
* two may be used interchangeably. Though for readability of your code
|
||||
* SDL_InitSubSystem() might be preferred.
|
||||
*
|
||||
* The file I/O (for example: SDL_RWFromFile) and threading (SDL_CreateThread)
|
||||
* subsystems are initialized by default. Message boxes
|
||||
* (SDL_ShowSimpleMessageBox) also attempt to work without initializing the
|
||||
* video subsystem, in hopes of being useful in showing an error dialog when
|
||||
* SDL_Init fails. You must specifically initialize other subsystems if you
|
||||
* use them in your application.
|
||||
*
|
||||
* Logging (such as SDL_Log) works without initialization, too.
|
||||
*
|
||||
* `flags` may be any of the following OR'd together:
|
||||
*
|
||||
* - `SDL_INIT_TIMER`: timer subsystem
|
||||
* - `SDL_INIT_AUDIO`: audio subsystem
|
||||
* - `SDL_INIT_VIDEO`: video subsystem; automatically initializes the events
|
||||
* subsystem
|
||||
* - `SDL_INIT_JOYSTICK`: joystick subsystem; automatically initializes the
|
||||
* events subsystem
|
||||
* - `SDL_INIT_HAPTIC`: haptic (force feedback) subsystem
|
||||
* - `SDL_INIT_GAMECONTROLLER`: controller subsystem; automatically
|
||||
* initializes the joystick subsystem
|
||||
* - `SDL_INIT_EVENTS`: events subsystem
|
||||
* - `SDL_INIT_EVERYTHING`: all of the above subsystems
|
||||
* - `SDL_INIT_NOPARACHUTE`: compatibility; this flag is ignored
|
||||
*
|
||||
* Subsystem initialization is ref-counted, you must call SDL_QuitSubSystem()
|
||||
* for each SDL_InitSubSystem() to correctly shutdown a subsystem manually (or
|
||||
* call SDL_Quit() to force shutdown). If a subsystem is already loaded then
|
||||
* this call will increase the ref-count and return.
|
||||
*
|
||||
* \param flags subsystem initialization flags
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_InitSubSystem
|
||||
* \sa SDL_Quit
|
||||
* \sa SDL_SetMainReady
|
||||
* \sa SDL_WasInit
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
|
||||
|
||||
/**
|
||||
* Compatibility function to initialize the SDL library.
|
||||
*
|
||||
* In SDL2, this function and SDL_Init() are interchangeable.
|
||||
*
|
||||
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Init
|
||||
* \sa SDL_Quit
|
||||
* \sa SDL_QuitSubSystem
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
|
||||
|
||||
/**
|
||||
* Shut down specific SDL subsystems.
|
||||
*
|
||||
* If you start a subsystem using a call to that subsystem's init function
|
||||
* (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
|
||||
* SDL_QuitSubSystem() and SDL_WasInit() will not work. You will need to use
|
||||
* that subsystem's quit function (SDL_VideoQuit()) directly instead. But
|
||||
* generally, you should not be using those functions directly anyhow; use
|
||||
* SDL_Init() instead.
|
||||
*
|
||||
* You still need to call SDL_Quit() even if you close all open subsystems
|
||||
* with SDL_QuitSubSystem().
|
||||
*
|
||||
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_InitSubSystem
|
||||
* \sa SDL_Quit
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
|
||||
|
||||
/**
|
||||
* Get a mask of the specified subsystems which are currently initialized.
|
||||
*
|
||||
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
|
||||
* \returns a mask of all initialized subsystems if `flags` is 0, otherwise it
|
||||
* returns the initialization status of the specified subsystems.
|
||||
*
|
||||
* The return value does not include SDL_INIT_NOPARACHUTE.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Init
|
||||
* \sa SDL_InitSubSystem
|
||||
*/
|
||||
extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
|
||||
|
||||
/**
|
||||
* Clean up all initialized subsystems.
|
||||
*
|
||||
* You should call this function even if you have already shutdown each
|
||||
* initialized subsystem with SDL_QuitSubSystem(). It is safe to call this
|
||||
* function even in the case of errors in initialization.
|
||||
*
|
||||
* If you start a subsystem using a call to that subsystem's init function
|
||||
* (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
|
||||
* then you must use that subsystem's quit function (SDL_VideoQuit()) to shut
|
||||
* it down before calling SDL_Quit(). But generally, you should not be using
|
||||
* those functions directly anyhow; use SDL_Init() instead.
|
||||
*
|
||||
* You can use this function with atexit() to ensure that it is run when your
|
||||
* application is shutdown, but it is not wise to do this from a library or
|
||||
* other dynamically loaded code.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Init
|
||||
* \sa SDL_QuitSubSystem
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_Quit(void);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
@@ -1,324 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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.
|
||||
*/
|
||||
|
||||
#ifndef SDL_assert_h_
|
||||
#define SDL_assert_h_
|
||||
|
||||
#include "SDL_config.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef SDL_ASSERT_LEVEL
|
||||
#ifdef SDL_DEFAULT_ASSERT_LEVEL
|
||||
#define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL
|
||||
#elif defined(_DEBUG) || defined(DEBUG) || \
|
||||
(defined(__GNUC__) && !defined(__OPTIMIZE__))
|
||||
#define SDL_ASSERT_LEVEL 2
|
||||
#else
|
||||
#define SDL_ASSERT_LEVEL 1
|
||||
#endif
|
||||
#endif /* SDL_ASSERT_LEVEL */
|
||||
|
||||
/*
|
||||
These are macros and not first class functions so that the debugger breaks
|
||||
on the assertion line and not in some random guts of SDL, and so each
|
||||
assert can have unique static variables associated with it.
|
||||
*/
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
/* Don't include intrin.h here because it contains C++ code */
|
||||
extern void __cdecl __debugbreak(void);
|
||||
#define SDL_TriggerBreakpoint() __debugbreak()
|
||||
#elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
||||
#elif ( defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
|
||||
#elif defined(__APPLE__) && defined(__arm__)
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "bkpt #22\n\t" )
|
||||
#elif defined(__386__) && defined(__WATCOMC__)
|
||||
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
|
||||
#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
|
||||
#include <signal.h>
|
||||
#define SDL_TriggerBreakpoint() raise(SIGTRAP)
|
||||
#else
|
||||
/* How do we trigger breakpoints on this platform? */
|
||||
#define SDL_TriggerBreakpoint()
|
||||
#endif
|
||||
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
|
||||
# define SDL_FUNCTION __func__
|
||||
#elif ((__GNUC__ >= 2) || defined(_MSC_VER) || defined (__WATCOMC__))
|
||||
# define SDL_FUNCTION __FUNCTION__
|
||||
#else
|
||||
# define SDL_FUNCTION "???"
|
||||
#endif
|
||||
#define SDL_FILE __FILE__
|
||||
#define SDL_LINE __LINE__
|
||||
|
||||
/*
|
||||
sizeof (x) makes the compiler still parse the expression even without
|
||||
assertions enabled, so the code is always checked at compile time, but
|
||||
doesn't actually generate code for it, so there are no side effects or
|
||||
expensive checks at run time, just the constant size of what x WOULD be,
|
||||
which presumably gets optimized out as unused.
|
||||
This also solves the problem of...
|
||||
|
||||
int somevalue = blah();
|
||||
SDL_assert(somevalue == 1);
|
||||
|
||||
...which would cause compiles to complain that somevalue is unused if we
|
||||
disable assertions.
|
||||
*/
|
||||
|
||||
/* "while (0,0)" fools Microsoft's compiler's /W4 warning level into thinking
|
||||
this condition isn't constant. And looks like an owl's face! */
|
||||
#ifdef _MSC_VER /* stupid /W4 warnings. */
|
||||
#define SDL_NULL_WHILE_LOOP_CONDITION (0,0)
|
||||
#else
|
||||
#define SDL_NULL_WHILE_LOOP_CONDITION (0)
|
||||
#endif
|
||||
|
||||
#define SDL_disabled_assert(condition) \
|
||||
do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SDL_ASSERTION_RETRY, /**< Retry the assert immediately. */
|
||||
SDL_ASSERTION_BREAK, /**< Make the debugger trigger a breakpoint. */
|
||||
SDL_ASSERTION_ABORT, /**< Terminate the program. */
|
||||
SDL_ASSERTION_IGNORE, /**< Ignore the assert. */
|
||||
SDL_ASSERTION_ALWAYS_IGNORE /**< Ignore the assert from now on. */
|
||||
} SDL_AssertState;
|
||||
|
||||
typedef struct SDL_AssertData
|
||||
{
|
||||
int always_ignore;
|
||||
unsigned int trigger_count;
|
||||
const char *condition;
|
||||
const char *filename;
|
||||
int linenum;
|
||||
const char *function;
|
||||
const struct SDL_AssertData *next;
|
||||
} SDL_AssertData;
|
||||
|
||||
#if (SDL_ASSERT_LEVEL > 0)
|
||||
|
||||
/* Never call this directly. Use the SDL_assert* macros. */
|
||||
extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
|
||||
const char *,
|
||||
const char *, int)
|
||||
#if defined(__clang__)
|
||||
#if __has_feature(attribute_analyzer_noreturn)
|
||||
/* this tells Clang's static analysis that we're a custom assert function,
|
||||
and that the analyzer should assume the condition was always true past this
|
||||
SDL_assert test. */
|
||||
__attribute__((analyzer_noreturn))
|
||||
#endif
|
||||
#endif
|
||||
;
|
||||
|
||||
/* the do {} while(0) avoids dangling else problems:
|
||||
if (x) SDL_assert(y); else blah();
|
||||
... without the do/while, the "else" could attach to this macro's "if".
|
||||
We try to handle just the minimum we need here in a macro...the loop,
|
||||
the static vars, and break points. The heavy lifting is handled in
|
||||
SDL_ReportAssertion(), in SDL_assert.c.
|
||||
*/
|
||||
#define SDL_enabled_assert(condition) \
|
||||
do { \
|
||||
while ( !(condition) ) { \
|
||||
static struct SDL_AssertData sdl_assert_data = { \
|
||||
0, 0, #condition, 0, 0, 0, 0 \
|
||||
}; \
|
||||
const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
|
||||
if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
|
||||
continue; /* go again. */ \
|
||||
} else if (sdl_assert_state == SDL_ASSERTION_BREAK) { \
|
||||
SDL_TriggerBreakpoint(); \
|
||||
} \
|
||||
break; /* not retrying. */ \
|
||||
} \
|
||||
} while (SDL_NULL_WHILE_LOOP_CONDITION)
|
||||
|
||||
#endif /* enabled assertions support code */
|
||||
|
||||
/* Enable various levels of assertions. */
|
||||
#if SDL_ASSERT_LEVEL == 0 /* assertions disabled */
|
||||
# define SDL_assert(condition) SDL_disabled_assert(condition)
|
||||
# define SDL_assert_release(condition) SDL_disabled_assert(condition)
|
||||
# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
||||
#elif SDL_ASSERT_LEVEL == 1 /* release settings. */
|
||||
# define SDL_assert(condition) SDL_disabled_assert(condition)
|
||||
# define SDL_assert_release(condition) SDL_enabled_assert(condition)
|
||||
# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
||||
#elif SDL_ASSERT_LEVEL == 2 /* normal settings. */
|
||||
# define SDL_assert(condition) SDL_enabled_assert(condition)
|
||||
# define SDL_assert_release(condition) SDL_enabled_assert(condition)
|
||||
# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
||||
#elif SDL_ASSERT_LEVEL == 3 /* paranoid settings. */
|
||||
# define SDL_assert(condition) SDL_enabled_assert(condition)
|
||||
# define SDL_assert_release(condition) SDL_enabled_assert(condition)
|
||||
# define SDL_assert_paranoid(condition) SDL_enabled_assert(condition)
|
||||
#else
|
||||
# error Unknown assertion level.
|
||||
#endif
|
||||
|
||||
/* this assertion is never disabled at any level. */
|
||||
#define SDL_assert_always(condition) SDL_enabled_assert(condition)
|
||||
|
||||
|
||||
/**
|
||||
* A callback that fires when an SDL assertion fails.
|
||||
*
|
||||
* \param data a pointer to the SDL_AssertData structure corresponding to the
|
||||
* current assertion
|
||||
* \param userdata what was passed as `userdata` to SDL_SetAssertionHandler()
|
||||
* \returns an SDL_AssertState value indicating how to handle the failure.
|
||||
*/
|
||||
typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
|
||||
const SDL_AssertData* data, void* userdata);
|
||||
|
||||
/**
|
||||
* Set an application-defined assertion handler.
|
||||
*
|
||||
* This function allows an application to show its own assertion UI and/or
|
||||
* force the response to an assertion failure. If the application doesn't
|
||||
* provide this, SDL will try to do the right thing, popping up a
|
||||
* system-specific GUI dialog, and probably minimizing any fullscreen windows.
|
||||
*
|
||||
* This callback may fire from any thread, but it runs wrapped in a mutex, so
|
||||
* it will only fire from one thread at a time.
|
||||
*
|
||||
* This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
|
||||
*
|
||||
* \param handler the SDL_AssertionHandler function to call when an assertion
|
||||
* fails or NULL for the default handler
|
||||
* \param userdata a pointer that is passed to `handler`
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetAssertionHandler
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetAssertionHandler(
|
||||
SDL_AssertionHandler handler,
|
||||
void *userdata);
|
||||
|
||||
/**
|
||||
* Get the default assertion handler.
|
||||
*
|
||||
* This returns the function pointer that is called by default when an
|
||||
* assertion is triggered. This is an internal function provided by SDL, that
|
||||
* is used for assertions when SDL_SetAssertionHandler() hasn't been used to
|
||||
* provide a different function.
|
||||
*
|
||||
* \returns the default SDL_AssertionHandler that is called when an assert
|
||||
* triggers.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_GetAssertionHandler
|
||||
*/
|
||||
extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);
|
||||
|
||||
/**
|
||||
* Get the current assertion handler.
|
||||
*
|
||||
* This returns the function pointer that is called when an assertion is
|
||||
* triggered. This is either the value last passed to
|
||||
* SDL_SetAssertionHandler(), or if no application-specified function is set,
|
||||
* is equivalent to calling SDL_GetDefaultAssertionHandler().
|
||||
*
|
||||
* The parameter `puserdata` is a pointer to a void*, which will store the
|
||||
* "userdata" pointer that was passed to SDL_SetAssertionHandler(). This value
|
||||
* will always be NULL for the default handler. If you don't care about this
|
||||
* data, it is safe to pass a NULL pointer to this function to ignore it.
|
||||
*
|
||||
* \param puserdata pointer which is filled with the "userdata" pointer that
|
||||
* was passed to SDL_SetAssertionHandler()
|
||||
* \returns the SDL_AssertionHandler that is called when an assert triggers.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_SetAssertionHandler
|
||||
*/
|
||||
extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);
|
||||
|
||||
/**
|
||||
* Get a list of all assertion failures.
|
||||
*
|
||||
* This function gets all assertions triggered since the last call to
|
||||
* SDL_ResetAssertionReport(), or the start of the program.
|
||||
*
|
||||
* The proper way to examine this data looks something like this:
|
||||
*
|
||||
* ```c
|
||||
* const SDL_AssertData *item = SDL_GetAssertionReport();
|
||||
* while (item) {
|
||||
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
|
||||
* item->condition, item->function, item->filename,
|
||||
* item->linenum, item->trigger_count,
|
||||
* item->always_ignore ? "yes" : "no");
|
||||
* item = item->next;
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* \returns a list of all failed assertions or NULL if the list is empty. This
|
||||
* memory should not be modified or freed by the application.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_ResetAssertionReport
|
||||
*/
|
||||
extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);
|
||||
|
||||
/**
|
||||
* Clear the list of all assertion failures.
|
||||
*
|
||||
* This function will clear the list of all assertions triggered up to that
|
||||
* point. Immediately following this call, SDL_GetAssertionReport will return
|
||||
* no items. In addition, any previously-triggered assertions will be reset to
|
||||
* a trigger_count of zero, and their always_ignore state will be false.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetAssertionReport
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
|
||||
|
||||
|
||||
/* these had wrong naming conventions until 2.0.4. Please update your app! */
|
||||
#define SDL_assert_state SDL_AssertState
|
||||
#define SDL_assert_data SDL_AssertData
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_assert_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
@@ -1,395 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_atomic.h
|
||||
*
|
||||
* Atomic operations.
|
||||
*
|
||||
* IMPORTANT:
|
||||
* If you are not an expert in concurrent lockless programming, you should
|
||||
* only be using the atomic lock and reference counting functions in this
|
||||
* file. In all other cases you should be protecting your data structures
|
||||
* with full mutexes.
|
||||
*
|
||||
* The list of "safe" functions to use are:
|
||||
* SDL_AtomicLock()
|
||||
* SDL_AtomicUnlock()
|
||||
* SDL_AtomicIncRef()
|
||||
* SDL_AtomicDecRef()
|
||||
*
|
||||
* Seriously, here be dragons!
|
||||
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
*
|
||||
* You can find out a little more about lockless programming and the
|
||||
* subtle issues that can arise here:
|
||||
* http://msdn.microsoft.com/en-us/library/ee418650%28v=vs.85%29.aspx
|
||||
*
|
||||
* There's also lots of good information here:
|
||||
* http://www.1024cores.net/home/lock-free-algorithms
|
||||
* http://preshing.com/
|
||||
*
|
||||
* These operations may or may not actually be implemented using
|
||||
* processor specific atomic operations. When possible they are
|
||||
* implemented as true processor specific atomic operations. When that
|
||||
* is not possible the are implemented using locks that *do* use the
|
||||
* available atomic operations.
|
||||
*
|
||||
* All of the atomic operations that modify memory are full memory barriers.
|
||||
*/
|
||||
|
||||
#ifndef SDL_atomic_h_
|
||||
#define SDL_atomic_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_platform.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \name SDL AtomicLock
|
||||
*
|
||||
* The atomic locks are efficient spinlocks using CPU instructions,
|
||||
* but are vulnerable to starvation and can spin forever if a thread
|
||||
* holding a lock has been terminated. For this reason you should
|
||||
* minimize the code executed inside an atomic lock and never do
|
||||
* expensive things like API or system calls while holding them.
|
||||
*
|
||||
* The atomic locks are not safe to lock recursively.
|
||||
*
|
||||
* Porting Note:
|
||||
* The spin lock functions and type are required and can not be
|
||||
* emulated because they are used in the atomic emulation code.
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
typedef int SDL_SpinLock;
|
||||
|
||||
/**
|
||||
* Try to lock a spin lock by setting it to a non-zero value.
|
||||
*
|
||||
* ***Please note that spinlocks are dangerous if you don't know what you're
|
||||
* doing. Please be careful using any sort of spinlock!***
|
||||
*
|
||||
* \param lock a pointer to a lock variable
|
||||
* \returns SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already
|
||||
* held.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_AtomicLock
|
||||
* \sa SDL_AtomicUnlock
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTryLock(SDL_SpinLock *lock);
|
||||
|
||||
/**
|
||||
* Lock a spin lock by setting it to a non-zero value.
|
||||
*
|
||||
* ***Please note that spinlocks are dangerous if you don't know what you're
|
||||
* doing. Please be careful using any sort of spinlock!***
|
||||
*
|
||||
* \param lock a pointer to a lock variable
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_AtomicTryLock
|
||||
* \sa SDL_AtomicUnlock
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock);
|
||||
|
||||
/**
|
||||
* Unlock a spin lock by setting it to 0.
|
||||
*
|
||||
* Always returns immediately.
|
||||
*
|
||||
* ***Please note that spinlocks are dangerous if you don't know what you're
|
||||
* doing. Please be careful using any sort of spinlock!***
|
||||
*
|
||||
* \param lock a pointer to a lock variable
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_AtomicLock
|
||||
* \sa SDL_AtomicTryLock
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
|
||||
|
||||
/* @} *//* SDL AtomicLock */
|
||||
|
||||
|
||||
/**
|
||||
* The compiler barrier prevents the compiler from reordering
|
||||
* reads and writes to globally visible variables across the call.
|
||||
*/
|
||||
#if defined(_MSC_VER) && (_MSC_VER > 1200) && !defined(__clang__)
|
||||
void _ReadWriteBarrier(void);
|
||||
#pragma intrinsic(_ReadWriteBarrier)
|
||||
#define SDL_CompilerBarrier() _ReadWriteBarrier()
|
||||
#elif (defined(__GNUC__) && !defined(__EMSCRIPTEN__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
|
||||
/* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */
|
||||
#define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory")
|
||||
#elif defined(__WATCOMC__)
|
||||
extern __inline void SDL_CompilerBarrier(void);
|
||||
#pragma aux SDL_CompilerBarrier = "" parm [] modify exact [];
|
||||
#else
|
||||
#define SDL_CompilerBarrier() \
|
||||
{ SDL_SpinLock _tmp = 0; SDL_AtomicLock(&_tmp); SDL_AtomicUnlock(&_tmp); }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Memory barriers are designed to prevent reads and writes from being
|
||||
* reordered by the compiler and being seen out of order on multi-core CPUs.
|
||||
*
|
||||
* A typical pattern would be for thread A to write some data and a flag, and
|
||||
* for thread B to read the flag and get the data. In this case you would
|
||||
* insert a release barrier between writing the data and the flag,
|
||||
* guaranteeing that the data write completes no later than the flag is
|
||||
* written, and you would insert an acquire barrier between reading the flag
|
||||
* and reading the data, to ensure that all the reads associated with the flag
|
||||
* have completed.
|
||||
*
|
||||
* In this pattern you should always see a release barrier paired with an
|
||||
* acquire barrier and you should gate the data reads/writes with a single
|
||||
* flag variable.
|
||||
*
|
||||
* For more information on these semantics, take a look at the blog post:
|
||||
* http://preshing.com/20120913/acquire-and-release-semantics
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void);
|
||||
extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
|
||||
|
||||
#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||
#elif defined(__GNUC__) && defined(__aarch64__)
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#elif defined(__GNUC__) && defined(__arm__)
|
||||
#if 0 /* defined(__LINUX__) || defined(__ANDROID__) */
|
||||
/* Information from:
|
||||
https://chromium.googlesource.com/chromium/chromium/+/trunk/base/atomicops_internals_arm_gcc.h#19
|
||||
|
||||
The Linux kernel provides a helper function which provides the right code for a memory barrier,
|
||||
hard-coded at address 0xffff0fa0
|
||||
*/
|
||||
typedef void (*SDL_KernelMemoryBarrierFunc)();
|
||||
#define SDL_MemoryBarrierRelease() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
|
||||
#define SDL_MemoryBarrierAcquire() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
|
||||
#elif 0 /* defined(__QNXNTO__) */
|
||||
#include <sys/cpuinline.h>
|
||||
|
||||
#define SDL_MemoryBarrierRelease() __cpu_membarrier()
|
||||
#define SDL_MemoryBarrierAcquire() __cpu_membarrier()
|
||||
#else
|
||||
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__)
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)
|
||||
#ifdef __thumb__
|
||||
/* The mcr instruction isn't available in thumb mode, use real functions */
|
||||
#define SDL_MEMORY_BARRIER_USES_FUNCTION
|
||||
#define SDL_MemoryBarrierRelease() SDL_MemoryBarrierReleaseFunction()
|
||||
#define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction()
|
||||
#else
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
|
||||
#endif /* __thumb__ */
|
||||
#else
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory")
|
||||
#endif /* __LINUX__ || __ANDROID__ */
|
||||
#endif /* __GNUC__ && __arm__ */
|
||||
#else
|
||||
#if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
|
||||
/* This is correct for all CPUs on Solaris when using Solaris Studio 12.1+. */
|
||||
#include <mbarrier.h>
|
||||
#define SDL_MemoryBarrierRelease() __machine_rel_barrier()
|
||||
#define SDL_MemoryBarrierAcquire() __machine_acq_barrier()
|
||||
#else
|
||||
/* This is correct for the x86 and x64 CPUs, and we'll expand this over time. */
|
||||
#define SDL_MemoryBarrierRelease() SDL_CompilerBarrier()
|
||||
#define SDL_MemoryBarrierAcquire() SDL_CompilerBarrier()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief A type representing an atomic integer value. It is a struct
|
||||
* so people don't accidentally use numeric operations on it.
|
||||
*/
|
||||
typedef struct { int value; } SDL_atomic_t;
|
||||
|
||||
/**
|
||||
* Set an atomic variable to a new value if it is currently an old value.
|
||||
*
|
||||
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||
* it!***
|
||||
*
|
||||
* \param a a pointer to an SDL_atomic_t variable to be modified
|
||||
* \param oldval the old value
|
||||
* \param newval the new value
|
||||
* \returns SDL_TRUE if the atomic variable was set, SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_AtomicCASPtr
|
||||
* \sa SDL_AtomicGet
|
||||
* \sa SDL_AtomicSet
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval);
|
||||
|
||||
/**
|
||||
* Set an atomic variable to a value.
|
||||
*
|
||||
* This function also acts as a full memory barrier.
|
||||
*
|
||||
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||
* it!***
|
||||
*
|
||||
* \param a a pointer to an SDL_atomic_t variable to be modified
|
||||
* \param v the desired value
|
||||
* \returns the previous value of the atomic variable.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_AtomicGet
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v);
|
||||
|
||||
/**
|
||||
* Get the value of an atomic variable.
|
||||
*
|
||||
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||
* it!***
|
||||
*
|
||||
* \param a a pointer to an SDL_atomic_t variable
|
||||
* \returns the current value of an atomic variable.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_AtomicSet
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a);
|
||||
|
||||
/**
|
||||
* Add to an atomic variable.
|
||||
*
|
||||
* This function also acts as a full memory barrier.
|
||||
*
|
||||
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||
* it!***
|
||||
*
|
||||
* \param a a pointer to an SDL_atomic_t variable to be modified
|
||||
* \param v the desired value to add
|
||||
* \returns the previous value of the atomic variable.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_AtomicDecRef
|
||||
* \sa SDL_AtomicIncRef
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_atomic_t *a, int v);
|
||||
|
||||
/**
|
||||
* \brief Increment an atomic variable used as a reference count.
|
||||
*/
|
||||
#ifndef SDL_AtomicIncRef
|
||||
#define SDL_AtomicIncRef(a) SDL_AtomicAdd(a, 1)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Decrement an atomic variable used as a reference count.
|
||||
*
|
||||
* \return SDL_TRUE if the variable reached zero after decrementing,
|
||||
* SDL_FALSE otherwise
|
||||
*/
|
||||
#ifndef SDL_AtomicDecRef
|
||||
#define SDL_AtomicDecRef(a) (SDL_AtomicAdd(a, -1) == 1)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Set a pointer to a new value if it is currently an old value.
|
||||
*
|
||||
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||
* it!***
|
||||
*
|
||||
* \param a a pointer to a pointer
|
||||
* \param oldval the old pointer value
|
||||
* \param newval the new pointer value
|
||||
* \returns SDL_TRUE if the pointer was set, SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_AtomicCAS
|
||||
* \sa SDL_AtomicGetPtr
|
||||
* \sa SDL_AtomicSetPtr
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void *newval);
|
||||
|
||||
/**
|
||||
* Set a pointer to a value atomically.
|
||||
*
|
||||
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||
* it!***
|
||||
*
|
||||
* \param a a pointer to a pointer
|
||||
* \param v the desired pointer value
|
||||
* \returns the previous value of the pointer.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_AtomicCASPtr
|
||||
* \sa SDL_AtomicGetPtr
|
||||
*/
|
||||
extern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v);
|
||||
|
||||
/**
|
||||
* Get the value of a pointer atomically.
|
||||
*
|
||||
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||
* it!***
|
||||
*
|
||||
* \param a a pointer to a pointer
|
||||
* \returns the current value of a pointer.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_AtomicCASPtr
|
||||
* \sa SDL_AtomicSetPtr
|
||||
*/
|
||||
extern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_atomic_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,198 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_blendmode.h
|
||||
*
|
||||
* Header file declaring the SDL_BlendMode enumeration
|
||||
*/
|
||||
|
||||
#ifndef SDL_blendmode_h_
|
||||
#define SDL_blendmode_h_
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief The blend mode used in SDL_RenderCopy() and drawing operations.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_BLENDMODE_NONE = 0x00000000, /**< no blending
|
||||
dstRGBA = srcRGBA */
|
||||
SDL_BLENDMODE_BLEND = 0x00000001, /**< alpha blending
|
||||
dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA))
|
||||
dstA = srcA + (dstA * (1-srcA)) */
|
||||
SDL_BLENDMODE_ADD = 0x00000002, /**< additive blending
|
||||
dstRGB = (srcRGB * srcA) + dstRGB
|
||||
dstA = dstA */
|
||||
SDL_BLENDMODE_MOD = 0x00000004, /**< color modulate
|
||||
dstRGB = srcRGB * dstRGB
|
||||
dstA = dstA */
|
||||
SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply
|
||||
dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA))
|
||||
dstA = (srcA * dstA) + (dstA * (1-srcA)) */
|
||||
SDL_BLENDMODE_INVALID = 0x7FFFFFFF
|
||||
|
||||
/* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */
|
||||
|
||||
} SDL_BlendMode;
|
||||
|
||||
/**
|
||||
* \brief The blend operation used when combining source and destination pixel components
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */
|
||||
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D9, D3D11 */
|
||||
SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D9, D3D11 */
|
||||
} SDL_BlendOperation;
|
||||
|
||||
/**
|
||||
* \brief The normalized factor used to multiply pixel components
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_BLENDFACTOR_ZERO = 0x1, /**< 0, 0, 0, 0 */
|
||||
SDL_BLENDFACTOR_ONE = 0x2, /**< 1, 1, 1, 1 */
|
||||
SDL_BLENDFACTOR_SRC_COLOR = 0x3, /**< srcR, srcG, srcB, srcA */
|
||||
SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR = 0x4, /**< 1-srcR, 1-srcG, 1-srcB, 1-srcA */
|
||||
SDL_BLENDFACTOR_SRC_ALPHA = 0x5, /**< srcA, srcA, srcA, srcA */
|
||||
SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA = 0x6, /**< 1-srcA, 1-srcA, 1-srcA, 1-srcA */
|
||||
SDL_BLENDFACTOR_DST_COLOR = 0x7, /**< dstR, dstG, dstB, dstA */
|
||||
SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8, /**< 1-dstR, 1-dstG, 1-dstB, 1-dstA */
|
||||
SDL_BLENDFACTOR_DST_ALPHA = 0x9, /**< dstA, dstA, dstA, dstA */
|
||||
SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA /**< 1-dstA, 1-dstA, 1-dstA, 1-dstA */
|
||||
} SDL_BlendFactor;
|
||||
|
||||
/**
|
||||
* Compose a custom blend mode for renderers.
|
||||
*
|
||||
* The functions SDL_SetRenderDrawBlendMode and SDL_SetTextureBlendMode accept
|
||||
* the SDL_BlendMode returned by this function if the renderer supports it.
|
||||
*
|
||||
* A blend mode controls how the pixels from a drawing operation (source) get
|
||||
* combined with the pixels from the render target (destination). First, the
|
||||
* components of the source and destination pixels get multiplied with their
|
||||
* blend factors. Then, the blend operation takes the two products and
|
||||
* calculates the result that will get stored in the render target.
|
||||
*
|
||||
* Expressed in pseudocode, it would look like this:
|
||||
*
|
||||
* ```c
|
||||
* dstRGB = colorOperation(srcRGB * srcColorFactor, dstRGB * dstColorFactor);
|
||||
* dstA = alphaOperation(srcA * srcAlphaFactor, dstA * dstAlphaFactor);
|
||||
* ```
|
||||
*
|
||||
* Where the functions `colorOperation(src, dst)` and `alphaOperation(src,
|
||||
* dst)` can return one of the following:
|
||||
*
|
||||
* - `src + dst`
|
||||
* - `src - dst`
|
||||
* - `dst - src`
|
||||
* - `min(src, dst)`
|
||||
* - `max(src, dst)`
|
||||
*
|
||||
* The red, green, and blue components are always multiplied with the first,
|
||||
* second, and third components of the SDL_BlendFactor, respectively. The
|
||||
* fourth component is not used.
|
||||
*
|
||||
* The alpha component is always multiplied with the fourth component of the
|
||||
* SDL_BlendFactor. The other components are not used in the alpha
|
||||
* calculation.
|
||||
*
|
||||
* Support for these blend modes varies for each renderer. To check if a
|
||||
* specific SDL_BlendMode is supported, create a renderer and pass it to
|
||||
* either SDL_SetRenderDrawBlendMode or SDL_SetTextureBlendMode. They will
|
||||
* return with an error if the blend mode is not supported.
|
||||
*
|
||||
* This list describes the support of custom blend modes for each renderer in
|
||||
* SDL 2.0.6. All renderers support the four blend modes listed in the
|
||||
* SDL_BlendMode enumeration.
|
||||
*
|
||||
* - **direct3d**: Supports all operations with all factors. However, some
|
||||
* factors produce unexpected results with `SDL_BLENDOPERATION_MINIMUM` and
|
||||
* `SDL_BLENDOPERATION_MAXIMUM`.
|
||||
* - **direct3d11**: Same as Direct3D 9.
|
||||
* - **opengl**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
|
||||
* factors. OpenGL versions 1.1, 1.2, and 1.3 do not work correctly with SDL
|
||||
* 2.0.6.
|
||||
* - **opengles**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
|
||||
* factors. Color and alpha factors need to be the same. OpenGL ES 1
|
||||
* implementation specific: May also support `SDL_BLENDOPERATION_SUBTRACT`
|
||||
* and `SDL_BLENDOPERATION_REV_SUBTRACT`. May support color and alpha
|
||||
* operations being different from each other. May support color and alpha
|
||||
* factors being different from each other.
|
||||
* - **opengles2**: Supports the `SDL_BLENDOPERATION_ADD`,
|
||||
* `SDL_BLENDOPERATION_SUBTRACT`, `SDL_BLENDOPERATION_REV_SUBTRACT`
|
||||
* operations with all factors.
|
||||
* - **psp**: No custom blend mode support.
|
||||
* - **software**: No custom blend mode support.
|
||||
*
|
||||
* Some renderers do not provide an alpha component for the default render
|
||||
* target. The `SDL_BLENDFACTOR_DST_ALPHA` and
|
||||
* `SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA` factors do not have an effect in this
|
||||
* case.
|
||||
*
|
||||
* \param srcColorFactor the SDL_BlendFactor applied to the red, green, and
|
||||
* blue components of the source pixels
|
||||
* \param dstColorFactor the SDL_BlendFactor applied to the red, green, and
|
||||
* blue components of the destination pixels
|
||||
* \param colorOperation the SDL_BlendOperation used to combine the red,
|
||||
* green, and blue components of the source and
|
||||
* destination pixels
|
||||
* \param srcAlphaFactor the SDL_BlendFactor applied to the alpha component of
|
||||
* the source pixels
|
||||
* \param dstAlphaFactor the SDL_BlendFactor applied to the alpha component of
|
||||
* the destination pixels
|
||||
* \param alphaOperation the SDL_BlendOperation used to combine the alpha
|
||||
* component of the source and destination pixels
|
||||
* \returns an SDL_BlendMode that represents the chosen factors and
|
||||
* operations.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*
|
||||
* \sa SDL_SetRenderDrawBlendMode
|
||||
* \sa SDL_GetRenderDrawBlendMode
|
||||
* \sa SDL_SetTextureBlendMode
|
||||
* \sa SDL_GetTextureBlendMode
|
||||
*/
|
||||
extern DECLSPEC SDL_BlendMode SDLCALL SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor,
|
||||
SDL_BlendFactor dstColorFactor,
|
||||
SDL_BlendOperation colorOperation,
|
||||
SDL_BlendFactor srcAlphaFactor,
|
||||
SDL_BlendFactor dstAlphaFactor,
|
||||
SDL_BlendOperation alphaOperation);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_blendmode_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_clipboard.h
|
||||
*
|
||||
* Include file for SDL clipboard handling
|
||||
*/
|
||||
|
||||
#ifndef SDL_clipboard_h_
|
||||
#define SDL_clipboard_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* Put UTF-8 text into the clipboard.
|
||||
*
|
||||
* \param text the text to store in the clipboard
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetClipboardText
|
||||
* \sa SDL_HasClipboardText
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);
|
||||
|
||||
/**
|
||||
* Get UTF-8 text from the clipboard, which must be freed with SDL_free().
|
||||
*
|
||||
* This functions returns empty string if there was not enough memory left for
|
||||
* a copy of the clipboard's content.
|
||||
*
|
||||
* \returns the clipboard text on success or an empty string on failure; call
|
||||
* SDL_GetError() for more information. Caller must call SDL_free()
|
||||
* on the returned pointer when done with it (even if there was an
|
||||
* error).
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_HasClipboardText
|
||||
* \sa SDL_SetClipboardText
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
|
||||
|
||||
/**
|
||||
* Query whether the clipboard exists and contains a non-empty text string.
|
||||
*
|
||||
* \returns SDL_TRUE if the clipboard has text, or SDL_FALSE if it does not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetClipboardText
|
||||
* \sa SDL_SetClipboardText
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_clipboard_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/**
|
||||
* \file SDL_config.h
|
||||
*/
|
||||
|
||||
/* Add any platform that doesn't build using the configure system. */
|
||||
#if defined(__WIN32__)
|
||||
#include "SDL_config_windows.h"
|
||||
#elif defined(__WINRT__)
|
||||
#include "SDL_config_winrt.h"
|
||||
#elif defined(__MACOSX__)
|
||||
#include "SDL_config_macosx.h"
|
||||
#elif defined(__IPHONEOS__)
|
||||
#include "SDL_config_iphoneos.h"
|
||||
#elif defined(__ANDROID__)
|
||||
#include "SDL_config_android.h"
|
||||
#elif defined(__OS2__)
|
||||
#include "SDL_config_os2.h"
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
#include "SDL_config_emscripten.h"
|
||||
#else
|
||||
/* This is a minimal configuration just to get SDL running on new platforms. */
|
||||
#include "SDL_config_minimal.h"
|
||||
#endif /* platform config */
|
||||
|
||||
#ifdef USING_GENERATED_CONFIG_H
|
||||
#error Wrong SDL_config.h, check your include path?
|
||||
#endif
|
||||
|
||||
#endif /* SDL_config_h_ */
|
||||
@@ -1,585 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
/**
|
||||
* \file SDL_config.h.in
|
||||
*
|
||||
* This is a set of defines to configure the SDL features
|
||||
*/
|
||||
|
||||
/* General platform specific identifiers */
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/* C language features */
|
||||
#cmakedefine const @HAVE_CONST@
|
||||
#cmakedefine inline @HAVE_INLINE@
|
||||
#cmakedefine volatile @HAVE_VOLATILE@
|
||||
|
||||
/* C datatypes */
|
||||
/* Define SIZEOF_VOIDP for 64/32 architectures */
|
||||
#if defined(__LP64__) || defined(_LP64) || defined(_WIN64)
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#cmakedefine HAVE_GCC_ATOMICS @HAVE_GCC_ATOMICS@
|
||||
#cmakedefine HAVE_GCC_SYNC_LOCK_TEST_AND_SET @HAVE_GCC_SYNC_LOCK_TEST_AND_SET@
|
||||
|
||||
/* Comment this if you want to build without any C library requirements */
|
||||
#cmakedefine HAVE_LIBC 1
|
||||
#if HAVE_LIBC
|
||||
|
||||
/* Useful headers */
|
||||
#cmakedefine STDC_HEADERS 1
|
||||
#cmakedefine HAVE_ALLOCA_H 1
|
||||
#cmakedefine HAVE_CTYPE_H 1
|
||||
#cmakedefine HAVE_FLOAT_H 1
|
||||
#cmakedefine HAVE_ICONV_H 1
|
||||
#cmakedefine HAVE_INTTYPES_H 1
|
||||
#cmakedefine HAVE_LIMITS_H 1
|
||||
#cmakedefine HAVE_MALLOC_H 1
|
||||
#cmakedefine HAVE_MATH_H 1
|
||||
#cmakedefine HAVE_MEMORY_H 1
|
||||
#cmakedefine HAVE_SIGNAL_H 1
|
||||
#cmakedefine HAVE_STDARG_H 1
|
||||
#cmakedefine HAVE_STDINT_H 1
|
||||
#cmakedefine HAVE_STDIO_H 1
|
||||
#cmakedefine HAVE_STDLIB_H 1
|
||||
#cmakedefine HAVE_STRINGS_H 1
|
||||
#cmakedefine HAVE_STRING_H 1
|
||||
#cmakedefine HAVE_SYS_TYPES_H 1
|
||||
#cmakedefine HAVE_WCHAR_H 1
|
||||
#cmakedefine HAVE_PTHREAD_NP_H 1
|
||||
#cmakedefine HAVE_LIBUNWIND_H 1
|
||||
|
||||
/* C library functions */
|
||||
#cmakedefine HAVE_DLOPEN 1
|
||||
#cmakedefine HAVE_MALLOC 1
|
||||
#cmakedefine HAVE_CALLOC 1
|
||||
#cmakedefine HAVE_REALLOC 1
|
||||
#cmakedefine HAVE_FREE 1
|
||||
#cmakedefine HAVE_ALLOCA 1
|
||||
#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
|
||||
#cmakedefine HAVE_GETENV 1
|
||||
#cmakedefine HAVE_SETENV 1
|
||||
#cmakedefine HAVE_PUTENV 1
|
||||
#cmakedefine HAVE_UNSETENV 1
|
||||
#endif
|
||||
#cmakedefine HAVE_QSORT 1
|
||||
#cmakedefine HAVE_ABS 1
|
||||
#cmakedefine HAVE_BCOPY 1
|
||||
#cmakedefine HAVE_MEMSET 1
|
||||
#cmakedefine HAVE_MEMCPY 1
|
||||
#cmakedefine HAVE_MEMMOVE 1
|
||||
#cmakedefine HAVE_MEMCMP 1
|
||||
#cmakedefine HAVE_WCSLEN 1
|
||||
#cmakedefine HAVE_WCSLCPY 1
|
||||
#cmakedefine HAVE_WCSLCAT 1
|
||||
#cmakedefine HAVE__WCSDUP 1
|
||||
#cmakedefine HAVE_WCSDUP 1
|
||||
#cmakedefine HAVE_WCSSTR 1
|
||||
#cmakedefine HAVE_WCSCMP 1
|
||||
#cmakedefine HAVE_WCSNCMP 1
|
||||
#cmakedefine HAVE_WCSCASECMP 1
|
||||
#cmakedefine HAVE__WCSICMP 1
|
||||
#cmakedefine HAVE_WCSNCASECMP 1
|
||||
#cmakedefine HAVE__WCSNICMP 1
|
||||
#cmakedefine HAVE_STRLEN 1
|
||||
#cmakedefine HAVE_STRLCPY 1
|
||||
#cmakedefine HAVE_STRLCAT 1
|
||||
#cmakedefine HAVE__STRREV 1
|
||||
#cmakedefine HAVE__STRUPR 1
|
||||
#cmakedefine HAVE__STRLWR 1
|
||||
#cmakedefine HAVE_INDEX 1
|
||||
#cmakedefine HAVE_RINDEX 1
|
||||
#cmakedefine HAVE_STRCHR 1
|
||||
#cmakedefine HAVE_STRRCHR 1
|
||||
#cmakedefine HAVE_STRSTR 1
|
||||
#cmakedefine HAVE_STRTOK_R 1
|
||||
#cmakedefine HAVE_ITOA 1
|
||||
#cmakedefine HAVE__LTOA 1
|
||||
#cmakedefine HAVE__UITOA 1
|
||||
#cmakedefine HAVE__ULTOA 1
|
||||
#cmakedefine HAVE_STRTOL 1
|
||||
#cmakedefine HAVE_STRTOUL 1
|
||||
#cmakedefine HAVE__I64TOA 1
|
||||
#cmakedefine HAVE__UI64TOA 1
|
||||
#cmakedefine HAVE_STRTOLL 1
|
||||
#cmakedefine HAVE_STRTOULL 1
|
||||
#cmakedefine HAVE_STRTOD 1
|
||||
#cmakedefine HAVE_ATOI 1
|
||||
#cmakedefine HAVE_ATOF 1
|
||||
#cmakedefine HAVE_STRCMP 1
|
||||
#cmakedefine HAVE_STRNCMP 1
|
||||
#cmakedefine HAVE__STRICMP 1
|
||||
#cmakedefine HAVE_STRCASECMP 1
|
||||
#cmakedefine HAVE__STRNICMP 1
|
||||
#cmakedefine HAVE_STRNCASECMP 1
|
||||
#cmakedefine HAVE_SSCANF 1
|
||||
#cmakedefine HAVE_VSSCANF 1
|
||||
#cmakedefine HAVE_VSNPRINTF 1
|
||||
#cmakedefine HAVE_M_PI 1
|
||||
#cmakedefine HAVE_ACOS 1
|
||||
#cmakedefine HAVE_ACOSF 1
|
||||
#cmakedefine HAVE_ASIN 1
|
||||
#cmakedefine HAVE_ASINF 1
|
||||
#cmakedefine HAVE_ATAN 1
|
||||
#cmakedefine HAVE_ATANF 1
|
||||
#cmakedefine HAVE_ATAN2 1
|
||||
#cmakedefine HAVE_ATAN2F 1
|
||||
#cmakedefine HAVE_CEIL 1
|
||||
#cmakedefine HAVE_CEILF 1
|
||||
#cmakedefine HAVE_COPYSIGN 1
|
||||
#cmakedefine HAVE_COPYSIGNF 1
|
||||
#cmakedefine HAVE_COS 1
|
||||
#cmakedefine HAVE_COSF 1
|
||||
#cmakedefine HAVE_EXP 1
|
||||
#cmakedefine HAVE_EXPF 1
|
||||
#cmakedefine HAVE_FABS 1
|
||||
#cmakedefine HAVE_FABSF 1
|
||||
#cmakedefine HAVE_FLOOR 1
|
||||
#cmakedefine HAVE_FLOORF 1
|
||||
#cmakedefine HAVE_FMOD 1
|
||||
#cmakedefine HAVE_FMODF 1
|
||||
#cmakedefine HAVE_LOG 1
|
||||
#cmakedefine HAVE_LOGF 1
|
||||
#cmakedefine HAVE_LOG10 1
|
||||
#cmakedefine HAVE_LOG10F 1
|
||||
#cmakedefine HAVE_LROUND 1
|
||||
#cmakedefine HAVE_LROUNDF 1
|
||||
#cmakedefine HAVE_POW 1
|
||||
#cmakedefine HAVE_POWF 1
|
||||
#cmakedefine HAVE_ROUND 1
|
||||
#cmakedefine HAVE_ROUNDF 1
|
||||
#cmakedefine HAVE_SCALBN 1
|
||||
#cmakedefine HAVE_SCALBNF 1
|
||||
#cmakedefine HAVE_SIN 1
|
||||
#cmakedefine HAVE_SINF 1
|
||||
#cmakedefine HAVE_SQRT 1
|
||||
#cmakedefine HAVE_SQRTF 1
|
||||
#cmakedefine HAVE_TAN 1
|
||||
#cmakedefine HAVE_TANF 1
|
||||
#cmakedefine HAVE_TRUNC 1
|
||||
#cmakedefine HAVE_TRUNCF 1
|
||||
#cmakedefine HAVE_FOPEN64 1
|
||||
#cmakedefine HAVE_FSEEKO 1
|
||||
#cmakedefine HAVE_FSEEKO64 1
|
||||
#cmakedefine HAVE_SIGACTION 1
|
||||
#cmakedefine HAVE_SA_SIGACTION 1
|
||||
#cmakedefine HAVE_SETJMP 1
|
||||
#cmakedefine HAVE_NANOSLEEP 1
|
||||
#cmakedefine HAVE_SYSCONF 1
|
||||
#cmakedefine HAVE_SYSCTLBYNAME 1
|
||||
#cmakedefine HAVE_CLOCK_GETTIME 1
|
||||
#cmakedefine HAVE_GETPAGESIZE 1
|
||||
#cmakedefine HAVE_MPROTECT 1
|
||||
#cmakedefine HAVE_ICONV 1
|
||||
#cmakedefine HAVE_PTHREAD_SETNAME_NP 1
|
||||
#cmakedefine HAVE_PTHREAD_SET_NAME_NP 1
|
||||
#cmakedefine HAVE_SEM_TIMEDWAIT 1
|
||||
#cmakedefine HAVE_GETAUXVAL 1
|
||||
#cmakedefine HAVE_ELF_AUX_INFO 1
|
||||
#cmakedefine HAVE_POLL 1
|
||||
#cmakedefine HAVE__EXIT 1
|
||||
|
||||
#elif defined(__WIN32__)
|
||||
#cmakedefine HAVE_STDARG_H 1
|
||||
#cmakedefine HAVE_STDDEF_H 1
|
||||
#cmakedefine HAVE_FLOAT_H 1
|
||||
|
||||
#else
|
||||
/* We may need some replacement for stdarg.h here */
|
||||
#include <stdarg.h>
|
||||
#endif /* HAVE_LIBC */
|
||||
|
||||
#cmakedefine HAVE_ALTIVEC_H 1
|
||||
#cmakedefine HAVE_DBUS_DBUS_H 1
|
||||
#cmakedefine HAVE_FCITX 1
|
||||
#cmakedefine HAVE_IBUS_IBUS_H 1
|
||||
#cmakedefine HAVE_SYS_INOTIFY_H 1
|
||||
#cmakedefine HAVE_INOTIFY_INIT 1
|
||||
#cmakedefine HAVE_INOTIFY_INIT1 1
|
||||
#cmakedefine HAVE_INOTIFY 1
|
||||
#cmakedefine HAVE_O_CLOEXEC 1
|
||||
|
||||
/* Apple platforms might be building universal binaries, where Intel builds
|
||||
can use immintrin.h but other architectures can't. */
|
||||
#ifdef __APPLE__
|
||||
# if defined(__has_include) && (defined(__i386__) || defined(__x86_64))
|
||||
# if __has_include(<immintrin.h>)
|
||||
# define HAVE_IMMINTRIN_H 1
|
||||
# endif
|
||||
# endif
|
||||
#else /* non-Apple platforms can use the normal CMake check for this. */
|
||||
#cmakedefine HAVE_IMMINTRIN_H 1
|
||||
#endif
|
||||
|
||||
#cmakedefine HAVE_LIBUDEV_H 1
|
||||
#cmakedefine HAVE_LIBSAMPLERATE_H 1
|
||||
#cmakedefine HAVE_LIBDECOR_H 1
|
||||
|
||||
#cmakedefine HAVE_D3D_H @HAVE_D3D_H@
|
||||
#cmakedefine HAVE_D3D11_H @HAVE_D3D11_H@
|
||||
#cmakedefine HAVE_DDRAW_H @HAVE_DDRAW_H@
|
||||
#cmakedefine HAVE_DSOUND_H @HAVE_DSOUND_H@
|
||||
#cmakedefine HAVE_DINPUT_H @HAVE_DINPUT_H@
|
||||
#cmakedefine HAVE_XINPUT_H @HAVE_XINPUT_H@
|
||||
#cmakedefine HAVE_WINDOWS_GAMING_INPUT_H @HAVE_WINDOWS_GAMING_INPUT_H@
|
||||
#cmakedefine HAVE_DXGI_H @HAVE_DXGI_H@
|
||||
|
||||
#cmakedefine HAVE_MMDEVICEAPI_H @HAVE_MMDEVICEAPI_H@
|
||||
#cmakedefine HAVE_AUDIOCLIENT_H @HAVE_AUDIOCLIENT_H@
|
||||
#cmakedefine HAVE_TPCSHRD_H @HAVE_TPCSHRD_H@
|
||||
#cmakedefine HAVE_SENSORSAPI_H @HAVE_SENSORSAPI_H@
|
||||
#cmakedefine HAVE_ROAPI_H @HAVE_ROAPI_H@
|
||||
|
||||
#cmakedefine HAVE_XINPUT_GAMEPAD_EX @HAVE_XINPUT_GAMEPAD_EX@
|
||||
#cmakedefine HAVE_XINPUT_STATE_EX @HAVE_XINPUT_STATE_EX@
|
||||
|
||||
/* SDL internal assertion support */
|
||||
#cmakedefine SDL_DEFAULT_ASSERT_LEVEL @SDL_DEFAULT_ASSERT_LEVEL@
|
||||
|
||||
/* Allow disabling of core subsystems */
|
||||
#cmakedefine SDL_ATOMIC_DISABLED @SDL_ATOMIC_DISABLED@
|
||||
#cmakedefine SDL_AUDIO_DISABLED @SDL_AUDIO_DISABLED@
|
||||
#cmakedefine SDL_CPUINFO_DISABLED @SDL_CPUINFO_DISABLED@
|
||||
#cmakedefine SDL_EVENTS_DISABLED @SDL_EVENTS_DISABLED@
|
||||
#cmakedefine SDL_FILE_DISABLED @SDL_FILE_DISABLED@
|
||||
#cmakedefine SDL_JOYSTICK_DISABLED @SDL_JOYSTICK_DISABLED@
|
||||
#cmakedefine SDL_HAPTIC_DISABLED @SDL_HAPTIC_DISABLED@
|
||||
#cmakedefine SDL_HIDAPI_DISABLED @SDL_HIDAPI_DISABLED@
|
||||
#cmakedefine SDL_SENSOR_DISABLED @SDL_SENSOR_DISABLED@
|
||||
#cmakedefine SDL_LOADSO_DISABLED @SDL_LOADSO_DISABLED@
|
||||
#cmakedefine SDL_RENDER_DISABLED @SDL_RENDER_DISABLED@
|
||||
#cmakedefine SDL_THREADS_DISABLED @SDL_THREADS_DISABLED@
|
||||
#cmakedefine SDL_TIMERS_DISABLED @SDL_TIMERS_DISABLED@
|
||||
#cmakedefine SDL_VIDEO_DISABLED @SDL_VIDEO_DISABLED@
|
||||
#cmakedefine SDL_POWER_DISABLED @SDL_POWER_DISABLED@
|
||||
#cmakedefine SDL_FILESYSTEM_DISABLED @SDL_FILESYSTEM_DISABLED@
|
||||
#cmakedefine SDL_LOCALE_DISABLED @SDL_LOCALE_DISABLED@
|
||||
#cmakedefine SDL_MISC_DISABLED @SDL_MISC_DISABLED@
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ALSA @SDL_AUDIO_DRIVER_ALSA@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ALSA_DYNAMIC @SDL_AUDIO_DRIVER_ALSA_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ANDROID @SDL_AUDIO_DRIVER_ANDROID@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_OPENSLES @SDL_AUDIO_DRIVER_OPENSLES@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_AAUDIO @SDL_AUDIO_DRIVER_AAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ARTS @SDL_AUDIO_DRIVER_ARTS@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ARTS_DYNAMIC @SDL_AUDIO_DRIVER_ARTS_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_COREAUDIO @SDL_AUDIO_DRIVER_COREAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_DISK @SDL_AUDIO_DRIVER_DISK@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_DSOUND @SDL_AUDIO_DRIVER_DSOUND@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_DUMMY @SDL_AUDIO_DRIVER_DUMMY@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_EMSCRIPTEN @SDL_AUDIO_DRIVER_EMSCRIPTEN@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ESD @SDL_AUDIO_DRIVER_ESD@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ESD_DYNAMIC @SDL_AUDIO_DRIVER_ESD_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_FUSIONSOUND @SDL_AUDIO_DRIVER_FUSIONSOUND@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC @SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_HAIKU @SDL_AUDIO_DRIVER_HAIKU@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_JACK @SDL_AUDIO_DRIVER_JACK@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_JACK_DYNAMIC @SDL_AUDIO_DRIVER_JACK_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_NAS @SDL_AUDIO_DRIVER_NAS@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_NAS_DYNAMIC @SDL_AUDIO_DRIVER_NAS_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_NETBSD @SDL_AUDIO_DRIVER_NETBSD@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_OSS @SDL_AUDIO_DRIVER_OSS@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H @SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PAUDIO @SDL_AUDIO_DRIVER_PAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PIPEWIRE @SDL_AUDIO_DRIVER_PIPEWIRE@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC @SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PULSEAUDIO @SDL_AUDIO_DRIVER_PULSEAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC @SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_QSA @SDL_AUDIO_DRIVER_QSA@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_SNDIO @SDL_AUDIO_DRIVER_SNDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_SNDIO_DYNAMIC @SDL_AUDIO_DRIVER_SNDIO_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_SUNAUDIO @SDL_AUDIO_DRIVER_SUNAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_WASAPI @SDL_AUDIO_DRIVER_WASAPI@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_WINMM @SDL_AUDIO_DRIVER_WINMM@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_OS2 @SDL_AUDIO_DRIVER_OS2@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_VITA @SDL_AUDIO_DRIVER_VITA@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PSP @SDL_AUDIO_DRIVER_PSP@
|
||||
|
||||
/* Enable various input drivers */
|
||||
#cmakedefine SDL_INPUT_LINUXEV @SDL_INPUT_LINUXEV@
|
||||
#cmakedefine SDL_INPUT_LINUXKD @SDL_INPUT_LINUXKD@
|
||||
#cmakedefine SDL_INPUT_FBSDKBIO @SDL_INPUT_FBSDKBIO@
|
||||
#cmakedefine SDL_JOYSTICK_ANDROID @SDL_JOYSTICK_ANDROID@
|
||||
#cmakedefine SDL_JOYSTICK_HAIKU @SDL_JOYSTICK_HAIKU@
|
||||
#cmakedefine SDL_JOYSTICK_WGI @SDL_JOYSTICK_WGI@
|
||||
#cmakedefine SDL_JOYSTICK_DINPUT @SDL_JOYSTICK_DINPUT@
|
||||
#cmakedefine SDL_JOYSTICK_XINPUT @SDL_JOYSTICK_XINPUT@
|
||||
#cmakedefine SDL_JOYSTICK_DUMMY @SDL_JOYSTICK_DUMMY@
|
||||
#cmakedefine SDL_JOYSTICK_IOKIT @SDL_JOYSTICK_IOKIT@
|
||||
#cmakedefine SDL_JOYSTICK_MFI @SDL_JOYSTICK_MFI@
|
||||
#cmakedefine SDL_JOYSTICK_LINUX @SDL_JOYSTICK_LINUX@
|
||||
#cmakedefine SDL_JOYSTICK_OS2 @SDL_JOYSTICK_OS2@
|
||||
#cmakedefine SDL_JOYSTICK_USBHID @SDL_JOYSTICK_USBHID@
|
||||
#cmakedefine SDL_HAVE_MACHINE_JOYSTICK_H @SDL_HAVE_MACHINE_JOYSTICK_H@
|
||||
#cmakedefine SDL_JOYSTICK_HIDAPI @SDL_JOYSTICK_HIDAPI@
|
||||
#cmakedefine SDL_JOYSTICK_RAWINPUT @SDL_JOYSTICK_RAWINPUT@
|
||||
#cmakedefine SDL_JOYSTICK_EMSCRIPTEN @SDL_JOYSTICK_EMSCRIPTEN@
|
||||
#cmakedefine SDL_JOYSTICK_VIRTUAL @SDL_JOYSTICK_VIRTUAL@
|
||||
#cmakedefine SDL_JOYSTICK_VITA @SDL_JOYSTICK_VITA@
|
||||
#cmakedefine SDL_JOYSTICK_PSP @SDL_JOYSTICK_PSP@
|
||||
#cmakedefine SDL_HAPTIC_DUMMY @SDL_HAPTIC_DUMMY@
|
||||
#cmakedefine SDL_HAPTIC_LINUX @SDL_HAPTIC_LINUX@
|
||||
#cmakedefine SDL_HAPTIC_IOKIT @SDL_HAPTIC_IOKIT@
|
||||
#cmakedefine SDL_HAPTIC_DINPUT @SDL_HAPTIC_DINPUT@
|
||||
#cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@
|
||||
#cmakedefine SDL_HAPTIC_ANDROID @SDL_HAPTIC_ANDROID@
|
||||
#cmakedefine SDL_LIBUSB_DYNAMIC @SDL_LIBUSB_DYNAMIC@
|
||||
|
||||
/* Enable various sensor drivers */
|
||||
#cmakedefine SDL_SENSOR_ANDROID @SDL_SENSOR_ANDROID@
|
||||
#cmakedefine SDL_SENSOR_COREMOTION @SDL_SENSOR_COREMOTION@
|
||||
#cmakedefine SDL_SENSOR_WINDOWS @SDL_SENSOR_WINDOWS@
|
||||
#cmakedefine SDL_SENSOR_DUMMY @SDL_SENSOR_DUMMY@
|
||||
#cmakedefine SDL_SENSOR_VITA @SDL_SENSOR_VITA@
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#cmakedefine SDL_LOADSO_DLOPEN @SDL_LOADSO_DLOPEN@
|
||||
#cmakedefine SDL_LOADSO_DUMMY @SDL_LOADSO_DUMMY@
|
||||
#cmakedefine SDL_LOADSO_LDG @SDL_LOADSO_LDG@
|
||||
#cmakedefine SDL_LOADSO_WINDOWS @SDL_LOADSO_WINDOWS@
|
||||
#cmakedefine SDL_LOADSO_OS2 @SDL_LOADSO_OS2@
|
||||
|
||||
/* Enable various threading systems */
|
||||
#cmakedefine SDL_THREAD_GENERIC_COND_SUFFIX @SDL_THREAD_GENERIC_COND_SUFFIX@
|
||||
#cmakedefine SDL_THREAD_PTHREAD @SDL_THREAD_PTHREAD@
|
||||
#cmakedefine SDL_THREAD_PTHREAD_RECURSIVE_MUTEX @SDL_THREAD_PTHREAD_RECURSIVE_MUTEX@
|
||||
#cmakedefine SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP @SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP@
|
||||
#cmakedefine SDL_THREAD_WINDOWS @SDL_THREAD_WINDOWS@
|
||||
#cmakedefine SDL_THREAD_OS2 @SDL_THREAD_OS2@
|
||||
#cmakedefine SDL_THREAD_VITA @SDL_THREAD_VITA@
|
||||
#cmakedefine SDL_THREAD_PSP @SDL_THREAD_PSP@
|
||||
|
||||
/* Enable various timer systems */
|
||||
#cmakedefine SDL_TIMER_HAIKU @SDL_TIMER_HAIKU@
|
||||
#cmakedefine SDL_TIMER_DUMMY @SDL_TIMER_DUMMY@
|
||||
#cmakedefine SDL_TIMER_UNIX @SDL_TIMER_UNIX@
|
||||
#cmakedefine SDL_TIMER_WINDOWS @SDL_TIMER_WINDOWS@
|
||||
#cmakedefine SDL_TIMER_OS2 @SDL_TIMER_OS2@
|
||||
#cmakedefine SDL_TIMER_VITA @SDL_TIMER_VITA@
|
||||
#cmakedefine SDL_TIMER_PSP @SDL_TIMER_PSP@
|
||||
|
||||
/* Enable various video drivers */
|
||||
#cmakedefine SDL_VIDEO_DRIVER_ANDROID @SDL_VIDEO_DRIVER_ANDROID@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_EMSCRIPTEN @SDL_VIDEO_DRIVER_EMSCRIPTEN@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_HAIKU @SDL_VIDEO_DRIVER_HAIKU@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_COCOA @SDL_VIDEO_DRIVER_COCOA@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_UIKIT @SDL_VIDEO_DRIVER_UIKIT@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB @SDL_VIDEO_DRIVER_DIRECTFB@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC @SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_DUMMY @SDL_VIDEO_DRIVER_DUMMY@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_OFFSCREEN @SDL_VIDEO_DRIVER_OFFSCREEN@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WINRT @SDL_VIDEO_DRIVER_WINRT@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_VIVANTE @SDL_VIDEO_DRIVER_VIVANTE@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_VIVANTE_VDK @SDL_VIDEO_DRIVER_VIVANTE_VDK@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_OS2 @SDL_VIDEO_DRIVER_OS2@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_QNX @SDL_VIDEO_DRIVER_QNX@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_RISCOS @SDL_VIDEO_DRIVER_RISCOS@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_PSP @SDL_VIDEO_DRIVER_PSP@
|
||||
|
||||
#cmakedefine SDL_VIDEO_DRIVER_KMSDRM @SDL_VIDEO_DRIVER_KMSDRM@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC @SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM @SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM@
|
||||
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH @SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR@
|
||||
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11 @SDL_VIDEO_DRIVER_X11@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC @SDL_VIDEO_DRIVER_X11_DYNAMIC@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT @SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR @SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA @SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 @SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES @SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR @SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS @SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE @SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XCURSOR @SDL_VIDEO_DRIVER_X11_XCURSOR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XDBE @SDL_VIDEO_DRIVER_X11_XDBE@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XINERAMA @SDL_VIDEO_DRIVER_X11_XINERAMA@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XINPUT2 @SDL_VIDEO_DRIVER_X11_XINPUT2@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH @SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XFIXES @SDL_VIDEO_DRIVER_X11_XFIXES@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XRANDR @SDL_VIDEO_DRIVER_X11_XRANDR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XSCRNSAVER @SDL_VIDEO_DRIVER_X11_XSCRNSAVER@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XSHAPE @SDL_VIDEO_DRIVER_X11_XSHAPE@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XVIDMODE @SDL_VIDEO_DRIVER_X11_XVIDMODE@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS @SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM @SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_VITA @SDL_VIDEO_DRIVER_VITA@
|
||||
|
||||
#cmakedefine SDL_VIDEO_RENDER_D3D @SDL_VIDEO_RENDER_D3D@
|
||||
#cmakedefine SDL_VIDEO_RENDER_D3D11 @SDL_VIDEO_RENDER_D3D11@
|
||||
#cmakedefine SDL_VIDEO_RENDER_OGL @SDL_VIDEO_RENDER_OGL@
|
||||
#cmakedefine SDL_VIDEO_RENDER_OGL_ES @SDL_VIDEO_RENDER_OGL_ES@
|
||||
#cmakedefine SDL_VIDEO_RENDER_OGL_ES2 @SDL_VIDEO_RENDER_OGL_ES2@
|
||||
#cmakedefine SDL_VIDEO_RENDER_DIRECTFB @SDL_VIDEO_RENDER_DIRECTFB@
|
||||
#cmakedefine SDL_VIDEO_RENDER_METAL @SDL_VIDEO_RENDER_METAL@
|
||||
#cmakedefine SDL_VIDEO_RENDER_VITA_GXM @SDL_VIDEO_RENDER_VITA_GXM@
|
||||
#cmakedefine SDL_VIDEO_RENDER_PSP @SDL_VIDEO_RENDER_PSP@
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#cmakedefine SDL_VIDEO_OPENGL @SDL_VIDEO_OPENGL@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_ES @SDL_VIDEO_OPENGL_ES@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_ES2 @SDL_VIDEO_OPENGL_ES2@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_BGL @SDL_VIDEO_OPENGL_BGL@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_CGL @SDL_VIDEO_OPENGL_CGL@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_GLX @SDL_VIDEO_OPENGL_GLX@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_WGL @SDL_VIDEO_OPENGL_WGL@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_EGL @SDL_VIDEO_OPENGL_EGL@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_OSMESA @SDL_VIDEO_OPENGL_OSMESA@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_OSMESA_DYNAMIC @SDL_VIDEO_OPENGL_OSMESA_DYNAMIC@
|
||||
|
||||
/* Enable Vulkan support */
|
||||
#cmakedefine SDL_VIDEO_VULKAN @SDL_VIDEO_VULKAN@
|
||||
|
||||
/* Enable Metal support */
|
||||
#cmakedefine SDL_VIDEO_METAL @SDL_VIDEO_METAL@
|
||||
|
||||
/* Enable system power support */
|
||||
#cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@
|
||||
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@
|
||||
#cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@
|
||||
#cmakedefine SDL_POWER_WINRT @SDL_POWER_WINRT@
|
||||
#cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@
|
||||
#cmakedefine SDL_POWER_UIKIT @SDL_POWER_UIKIT@
|
||||
#cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@
|
||||
#cmakedefine SDL_POWER_EMSCRIPTEN @SDL_POWER_EMSCRIPTEN@
|
||||
#cmakedefine SDL_POWER_HARDWIRED @SDL_POWER_HARDWIRED@
|
||||
#cmakedefine SDL_POWER_VITA @SDL_POWER_VITA@
|
||||
#cmakedefine SDL_POWER_PSP @SDL_POWER_PSP@
|
||||
|
||||
/* Enable system filesystem support */
|
||||
#cmakedefine SDL_FILESYSTEM_ANDROID @SDL_FILESYSTEM_ANDROID@
|
||||
#cmakedefine SDL_FILESYSTEM_HAIKU @SDL_FILESYSTEM_HAIKU@
|
||||
#cmakedefine SDL_FILESYSTEM_COCOA @SDL_FILESYSTEM_COCOA@
|
||||
#cmakedefine SDL_FILESYSTEM_DUMMY @SDL_FILESYSTEM_DUMMY@
|
||||
#cmakedefine SDL_FILESYSTEM_RISCOS @SDL_FILESYSTEM_RISCOS@
|
||||
#cmakedefine SDL_FILESYSTEM_UNIX @SDL_FILESYSTEM_UNIX@
|
||||
#cmakedefine SDL_FILESYSTEM_WINDOWS @SDL_FILESYSTEM_WINDOWS@
|
||||
#cmakedefine SDL_FILESYSTEM_EMSCRIPTEN @SDL_FILESYSTEM_EMSCRIPTEN@
|
||||
#cmakedefine SDL_FILESYSTEM_OS2 @SDL_FILESYSTEM_OS2@
|
||||
#cmakedefine SDL_FILESYSTEM_VITA @SDL_FILESYSTEM_VITA@
|
||||
#cmakedefine SDL_FILESYSTEM_PSP @SDL_FILESYSTEM_PSP@
|
||||
|
||||
/* Enable misc subsystem */
|
||||
#cmakedefine SDL_MISC_DUMMY @SDL_MISC_DUMMY@
|
||||
|
||||
/* Enable locale subsystem */
|
||||
#cmakedefine SDL_LOCALE_DUMMY @SDL_LOCALE_DUMMY@
|
||||
|
||||
/* Enable assembly routines */
|
||||
#cmakedefine SDL_ASSEMBLY_ROUTINES @SDL_ASSEMBLY_ROUTINES@
|
||||
#cmakedefine SDL_ALTIVEC_BLITTERS @SDL_ALTIVEC_BLITTERS@
|
||||
#cmakedefine SDL_ARM_SIMD_BLITTERS @SDL_ARM_SIMD_BLITTERS@
|
||||
#cmakedefine SDL_ARM_NEON_BLITTERS @SDL_ARM_NEON_BLITTERS@
|
||||
|
||||
/* Whether SDL_DYNAMIC_API needs dlopen */
|
||||
#cmakedefine DYNAPI_NEEDS_DLOPEN @DYNAPI_NEEDS_DLOPEN@
|
||||
|
||||
/* Enable dynamic libsamplerate support */
|
||||
#cmakedefine SDL_LIBSAMPLERATE_DYNAMIC @SDL_LIBSAMPLERATE_DYNAMIC@
|
||||
|
||||
/* Enable ime support */
|
||||
#cmakedefine SDL_USE_IME @SDL_USE_IME@
|
||||
|
||||
/* Platform specific definitions */
|
||||
#cmakedefine SDL_IPHONE_KEYBOARD @SDL_IPHONE_KEYBOARD@
|
||||
#cmakedefine SDL_IPHONE_LAUNCHSCREEN @SDL_IPHONE_LAUNCHSCREEN@
|
||||
|
||||
#cmakedefine SDL_VIDEO_VITA_PIB @SDL_VIDEO_VITA_PIB@
|
||||
#cmakedefine SDL_VIDEO_VITA_PVR @SDL_VIDEO_VITA_PVR@
|
||||
#cmakedefine SDL_VIDEO_VITA_PVR_OGL @SDL_VIDEO_VITA_PVR_OGL@
|
||||
|
||||
#if !defined(__WIN32__) && !defined(__WINRT__)
|
||||
# if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H)
|
||||
typedef unsigned int size_t;
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
typedef unsigned long uintptr_t;
|
||||
# endif /* if (stdint.h isn't available) */
|
||||
#else /* __WIN32__ */
|
||||
# if !defined(_STDINT_H_) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H)
|
||||
# if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__) || defined(__BORLANDC__) || defined(__CODEGEARC__)
|
||||
#define HAVE_STDINT_H 1
|
||||
# elif defined(_MSC_VER)
|
||||
typedef signed __int8 int8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef signed __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
# ifndef _UINTPTR_T_DEFINED
|
||||
# ifdef _WIN64
|
||||
typedef unsigned __int64 uintptr_t;
|
||||
# else
|
||||
typedef unsigned int uintptr_t;
|
||||
# endif
|
||||
#define _UINTPTR_T_DEFINED
|
||||
# endif
|
||||
/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
|
||||
# if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
|
||||
#define DWORD_PTR DWORD
|
||||
# endif
|
||||
# if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
|
||||
#define LONG_PTR LONG
|
||||
# endif
|
||||
# else /* !__GNUC__ && !_MSC_VER */
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
# ifndef _SIZE_T_DEFINED_
|
||||
#define _SIZE_T_DEFINED_
|
||||
typedef unsigned int size_t;
|
||||
# endif
|
||||
typedef unsigned int uintptr_t;
|
||||
# endif /* __GNUC__ || _MSC_VER */
|
||||
# endif /* !_STDINT_H_ && !HAVE_STDINT_H */
|
||||
#endif /* __WIN32__ */
|
||||
|
||||
#endif /* SDL_config_h_ */
|
||||
@@ -1,491 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
/**
|
||||
* \file SDL_config.h.in
|
||||
*
|
||||
* This is a set of defines to configure the SDL features
|
||||
*/
|
||||
|
||||
/* General platform specific identifiers */
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/* Make sure that this isn't included by Visual C++ */
|
||||
#ifdef _MSC_VER
|
||||
#error You should run git checkout -f include/SDL_config.h
|
||||
#endif
|
||||
|
||||
/* C language features */
|
||||
#undef const
|
||||
#undef inline
|
||||
#undef volatile
|
||||
|
||||
/* C datatypes */
|
||||
#if defined(__LP64__) || defined(_LP64) || defined(_WIN64)
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#undef HAVE_GCC_ATOMICS
|
||||
#undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET
|
||||
|
||||
/* Comment this if you want to build without any C library requirements */
|
||||
#undef HAVE_LIBC
|
||||
#if HAVE_LIBC
|
||||
|
||||
/* Useful headers */
|
||||
#undef STDC_HEADERS
|
||||
#undef HAVE_ALLOCA_H
|
||||
#undef HAVE_CTYPE_H
|
||||
#undef HAVE_FLOAT_H
|
||||
#undef HAVE_ICONV_H
|
||||
#undef HAVE_INTTYPES_H
|
||||
#undef HAVE_LIMITS_H
|
||||
#undef HAVE_MALLOC_H
|
||||
#undef HAVE_MATH_H
|
||||
#undef HAVE_MEMORY_H
|
||||
#undef HAVE_SIGNAL_H
|
||||
#undef HAVE_STDARG_H
|
||||
#undef HAVE_STDINT_H
|
||||
#undef HAVE_STDIO_H
|
||||
#undef HAVE_STDLIB_H
|
||||
#undef HAVE_STRINGS_H
|
||||
#undef HAVE_STRING_H
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
#undef HAVE_WCHAR_H
|
||||
#undef HAVE_PTHREAD_NP_H
|
||||
#undef HAVE_LIBUNWIND_H
|
||||
|
||||
/* C library functions */
|
||||
#undef HAVE_DLOPEN
|
||||
#undef HAVE_MALLOC
|
||||
#undef HAVE_CALLOC
|
||||
#undef HAVE_REALLOC
|
||||
#undef HAVE_FREE
|
||||
#undef HAVE_ALLOCA
|
||||
#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
|
||||
#undef HAVE_GETENV
|
||||
#undef HAVE_SETENV
|
||||
#undef HAVE_PUTENV
|
||||
#undef HAVE_UNSETENV
|
||||
#endif
|
||||
#undef HAVE_QSORT
|
||||
#undef HAVE_ABS
|
||||
#undef HAVE_BCOPY
|
||||
#undef HAVE_MEMSET
|
||||
#undef HAVE_MEMCPY
|
||||
#undef HAVE_MEMMOVE
|
||||
#undef HAVE_MEMCMP
|
||||
#undef HAVE_WCSLEN
|
||||
#undef HAVE_WCSLCPY
|
||||
#undef HAVE_WCSLCAT
|
||||
#undef HAVE__WCSDUP
|
||||
#undef HAVE_WCSDUP
|
||||
#undef HAVE_WCSSTR
|
||||
#undef HAVE_WCSCMP
|
||||
#undef HAVE_WCSNCMP
|
||||
#undef HAVE_WCSCASECMP
|
||||
#undef HAVE__WCSICMP
|
||||
#undef HAVE_WCSNCASECMP
|
||||
#undef HAVE__WCSNICMP
|
||||
#undef HAVE_STRLEN
|
||||
#undef HAVE_STRLCPY
|
||||
#undef HAVE_STRLCAT
|
||||
#undef HAVE__STRREV
|
||||
#undef HAVE__STRUPR
|
||||
#undef HAVE__STRLWR
|
||||
#undef HAVE_INDEX
|
||||
#undef HAVE_RINDEX
|
||||
#undef HAVE_STRCHR
|
||||
#undef HAVE_STRRCHR
|
||||
#undef HAVE_STRSTR
|
||||
#undef HAVE_STRTOK_R
|
||||
#undef HAVE_ITOA
|
||||
#undef HAVE__LTOA
|
||||
#undef HAVE__UITOA
|
||||
#undef HAVE__ULTOA
|
||||
#undef HAVE_STRTOL
|
||||
#undef HAVE_STRTOUL
|
||||
#undef HAVE__I64TOA
|
||||
#undef HAVE__UI64TOA
|
||||
#undef HAVE_STRTOLL
|
||||
#undef HAVE_STRTOULL
|
||||
#undef HAVE_STRTOD
|
||||
#undef HAVE_ATOI
|
||||
#undef HAVE_ATOF
|
||||
#undef HAVE_STRCMP
|
||||
#undef HAVE_STRNCMP
|
||||
#undef HAVE__STRICMP
|
||||
#undef HAVE_STRCASECMP
|
||||
#undef HAVE__STRNICMP
|
||||
#undef HAVE_STRNCASECMP
|
||||
#undef HAVE_SSCANF
|
||||
#undef HAVE_VSSCANF
|
||||
#undef HAVE_SNPRINTF
|
||||
#undef HAVE_VSNPRINTF
|
||||
#undef HAVE_M_PI
|
||||
#undef HAVE_ACOS
|
||||
#undef HAVE_ACOSF
|
||||
#undef HAVE_ASIN
|
||||
#undef HAVE_ASINF
|
||||
#undef HAVE_ATAN
|
||||
#undef HAVE_ATANF
|
||||
#undef HAVE_ATAN2
|
||||
#undef HAVE_ATAN2F
|
||||
#undef HAVE_CEIL
|
||||
#undef HAVE_CEILF
|
||||
#undef HAVE_COPYSIGN
|
||||
#undef HAVE_COPYSIGNF
|
||||
#undef HAVE_COS
|
||||
#undef HAVE_COSF
|
||||
#undef HAVE_EXP
|
||||
#undef HAVE_EXPF
|
||||
#undef HAVE_FABS
|
||||
#undef HAVE_FABSF
|
||||
#undef HAVE_FLOOR
|
||||
#undef HAVE_FLOORF
|
||||
#undef HAVE_FMOD
|
||||
#undef HAVE_FMODF
|
||||
#undef HAVE_LOG
|
||||
#undef HAVE_LOGF
|
||||
#undef HAVE_LOG10
|
||||
#undef HAVE_LOG10F
|
||||
#undef HAVE_LROUND
|
||||
#undef HAVE_LROUNDF
|
||||
#undef HAVE_POW
|
||||
#undef HAVE_POWF
|
||||
#undef HAVE_ROUND
|
||||
#undef HAVE_ROUNDF
|
||||
#undef HAVE_SCALBN
|
||||
#undef HAVE_SCALBNF
|
||||
#undef HAVE_SIN
|
||||
#undef HAVE_SINF
|
||||
#undef HAVE_SQRT
|
||||
#undef HAVE_SQRTF
|
||||
#undef HAVE_TAN
|
||||
#undef HAVE_TANF
|
||||
#undef HAVE_TRUNC
|
||||
#undef HAVE_TRUNCF
|
||||
#undef HAVE_FOPEN64
|
||||
#undef HAVE_FSEEKO
|
||||
#undef HAVE_FSEEKO64
|
||||
#undef HAVE_SIGACTION
|
||||
#undef HAVE_SA_SIGACTION
|
||||
#undef HAVE_SETJMP
|
||||
#undef HAVE_NANOSLEEP
|
||||
#undef HAVE_SYSCONF
|
||||
#undef HAVE_SYSCTLBYNAME
|
||||
#undef HAVE_CLOCK_GETTIME
|
||||
#undef HAVE_GETPAGESIZE
|
||||
#undef HAVE_MPROTECT
|
||||
#undef HAVE_ICONV
|
||||
#undef HAVE_PTHREAD_SETNAME_NP
|
||||
#undef HAVE_PTHREAD_SET_NAME_NP
|
||||
#undef HAVE_SEM_TIMEDWAIT
|
||||
#undef HAVE_GETAUXVAL
|
||||
#undef HAVE_ELF_AUX_INFO
|
||||
#undef HAVE_POLL
|
||||
#undef HAVE__EXIT
|
||||
|
||||
#else
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#endif /* HAVE_LIBC */
|
||||
|
||||
#undef HAVE_O_CLOEXEC
|
||||
#undef HAVE_ALTIVEC_H
|
||||
#undef HAVE_DBUS_DBUS_H
|
||||
#undef HAVE_FCITX
|
||||
#undef HAVE_SYS_INOTIFY_H
|
||||
#undef HAVE_INOTIFY_INIT
|
||||
#undef HAVE_INOTIFY_INIT1
|
||||
#undef HAVE_INOTIFY
|
||||
#undef HAVE_IBUS_IBUS_H
|
||||
#undef HAVE_IMMINTRIN_H
|
||||
#undef HAVE_LIBUDEV_H
|
||||
#undef HAVE_LIBSAMPLERATE_H
|
||||
#undef HAVE_LIBDECOR_H
|
||||
|
||||
#undef HAVE_DDRAW_H
|
||||
#undef HAVE_DINPUT_H
|
||||
#undef HAVE_DSOUND_H
|
||||
#undef HAVE_DXGI_H
|
||||
#undef HAVE_WINDOWS_GAMING_INPUT_H
|
||||
#undef HAVE_XINPUT_H
|
||||
#undef HAVE_XINPUT_GAMEPAD_EX
|
||||
#undef HAVE_XINPUT_STATE_EX
|
||||
|
||||
#undef HAVE_MMDEVICEAPI_H
|
||||
#undef HAVE_AUDIOCLIENT_H
|
||||
#undef HAVE_TPCSHRD_H
|
||||
#undef HAVE_SENSORSAPI_H
|
||||
#undef HAVE_ROAPI_H
|
||||
|
||||
/* SDL internal assertion support */
|
||||
#undef SDL_DEFAULT_ASSERT_LEVEL
|
||||
|
||||
/* Allow disabling of core subsystems */
|
||||
#undef SDL_ATOMIC_DISABLED
|
||||
#undef SDL_AUDIO_DISABLED
|
||||
#undef SDL_CPUINFO_DISABLED
|
||||
#undef SDL_EVENTS_DISABLED
|
||||
#undef SDL_FILE_DISABLED
|
||||
#undef SDL_JOYSTICK_DISABLED
|
||||
#undef SDL_HAPTIC_DISABLED
|
||||
#undef SDL_HIDAPI_DISABLED
|
||||
#undef SDL_SENSOR_DISABLED
|
||||
#undef SDL_LOADSO_DISABLED
|
||||
#undef SDL_RENDER_DISABLED
|
||||
#undef SDL_THREADS_DISABLED
|
||||
#undef SDL_TIMERS_DISABLED
|
||||
#undef SDL_VIDEO_DISABLED
|
||||
#undef SDL_POWER_DISABLED
|
||||
#undef SDL_FILESYSTEM_DISABLED
|
||||
#undef SDL_LOCALE_DISABLED
|
||||
#undef SDL_MISC_DISABLED
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#undef SDL_AUDIO_DRIVER_AAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_ALSA
|
||||
#undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_ANDROID
|
||||
#undef SDL_AUDIO_DRIVER_ARTS
|
||||
#undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_COREAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_DISK
|
||||
#undef SDL_AUDIO_DRIVER_DSOUND
|
||||
#undef SDL_AUDIO_DRIVER_DUMMY
|
||||
#undef SDL_AUDIO_DRIVER_EMSCRIPTEN
|
||||
#undef SDL_AUDIO_DRIVER_ESD
|
||||
#undef SDL_AUDIO_DRIVER_ESD_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_FUSIONSOUND
|
||||
#undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_HAIKU
|
||||
#undef SDL_AUDIO_DRIVER_JACK
|
||||
#undef SDL_AUDIO_DRIVER_JACK_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_NACL
|
||||
#undef SDL_AUDIO_DRIVER_NAS
|
||||
#undef SDL_AUDIO_DRIVER_NAS_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_NETBSD
|
||||
#undef SDL_AUDIO_DRIVER_OPENSLES
|
||||
#undef SDL_AUDIO_DRIVER_OSS
|
||||
#undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H
|
||||
#undef SDL_AUDIO_DRIVER_PAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_PIPEWIRE
|
||||
#undef SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_PULSEAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_QSA
|
||||
#undef SDL_AUDIO_DRIVER_SNDIO
|
||||
#undef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_SUNAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_WASAPI
|
||||
#undef SDL_AUDIO_DRIVER_WINMM
|
||||
#undef SDL_AUDIO_DRIVER_OS2
|
||||
|
||||
/* Enable various input drivers */
|
||||
#undef SDL_INPUT_LINUXEV
|
||||
#undef SDL_INPUT_FBSDKBIO
|
||||
#undef SDL_INPUT_LINUXKD
|
||||
#undef SDL_INPUT_WSCONS
|
||||
#undef SDL_JOYSTICK_HAIKU
|
||||
#undef SDL_JOYSTICK_DINPUT
|
||||
#undef SDL_JOYSTICK_WGI
|
||||
#undef SDL_JOYSTICK_XINPUT
|
||||
#undef SDL_JOYSTICK_DUMMY
|
||||
#undef SDL_JOYSTICK_IOKIT
|
||||
#undef SDL_JOYSTICK_MFI
|
||||
#undef SDL_JOYSTICK_LINUX
|
||||
#undef SDL_JOYSTICK_ANDROID
|
||||
#undef SDL_JOYSTICK_OS2
|
||||
#undef SDL_JOYSTICK_USBHID
|
||||
#undef SDL_HAVE_MACHINE_JOYSTICK_H
|
||||
#undef SDL_JOYSTICK_HIDAPI
|
||||
#undef SDL_JOYSTICK_RAWINPUT
|
||||
#undef SDL_JOYSTICK_EMSCRIPTEN
|
||||
#undef SDL_JOYSTICK_VIRTUAL
|
||||
#undef SDL_HAPTIC_DUMMY
|
||||
#undef SDL_HAPTIC_ANDROID
|
||||
#undef SDL_HAPTIC_LINUX
|
||||
#undef SDL_HAPTIC_IOKIT
|
||||
#undef SDL_HAPTIC_DINPUT
|
||||
#undef SDL_HAPTIC_XINPUT
|
||||
|
||||
/* Enable various sensor drivers */
|
||||
#undef SDL_SENSOR_ANDROID
|
||||
#undef SDL_SENSOR_COREMOTION
|
||||
#undef SDL_SENSOR_WINDOWS
|
||||
#undef SDL_SENSOR_DUMMY
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#undef SDL_LOADSO_DLOPEN
|
||||
#undef SDL_LOADSO_DUMMY
|
||||
#undef SDL_LOADSO_LDG
|
||||
#undef SDL_LOADSO_WINDOWS
|
||||
#undef SDL_LOADSO_OS2
|
||||
|
||||
/* Enable various threading systems */
|
||||
#undef SDL_THREAD_GENERIC_COND_SUFFIX
|
||||
#undef SDL_THREAD_PTHREAD
|
||||
#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX
|
||||
#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP
|
||||
#undef SDL_THREAD_WINDOWS
|
||||
#undef SDL_THREAD_OS2
|
||||
|
||||
/* Enable various timer systems */
|
||||
#undef SDL_TIMER_HAIKU
|
||||
#undef SDL_TIMER_DUMMY
|
||||
#undef SDL_TIMER_UNIX
|
||||
#undef SDL_TIMER_WINDOWS
|
||||
#undef SDL_TIMER_OS2
|
||||
|
||||
/* Enable various video drivers */
|
||||
#undef SDL_VIDEO_DRIVER_HAIKU
|
||||
#undef SDL_VIDEO_DRIVER_COCOA
|
||||
#undef SDL_VIDEO_DRIVER_DIRECTFB
|
||||
#undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC
|
||||
#undef SDL_VIDEO_DRIVER_DUMMY
|
||||
#undef SDL_VIDEO_DRIVER_WINDOWS
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR
|
||||
#undef SDL_VIDEO_DRIVER_X11
|
||||
#undef SDL_VIDEO_DRIVER_RPI
|
||||
#undef SDL_VIDEO_DRIVER_KMSDRM
|
||||
#undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC
|
||||
#undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM
|
||||
#undef SDL_VIDEO_DRIVER_ANDROID
|
||||
#undef SDL_VIDEO_DRIVER_EMSCRIPTEN
|
||||
#undef SDL_VIDEO_DRIVER_OFFSCREEN
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE
|
||||
#undef SDL_VIDEO_DRIVER_X11_XCURSOR
|
||||
#undef SDL_VIDEO_DRIVER_X11_XDBE
|
||||
#undef SDL_VIDEO_DRIVER_X11_XINERAMA
|
||||
#undef SDL_VIDEO_DRIVER_X11_XINPUT2
|
||||
#undef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
|
||||
#undef SDL_VIDEO_DRIVER_X11_XFIXES
|
||||
#undef SDL_VIDEO_DRIVER_X11_XRANDR
|
||||
#undef SDL_VIDEO_DRIVER_X11_XSCRNSAVER
|
||||
#undef SDL_VIDEO_DRIVER_X11_XSHAPE
|
||||
#undef SDL_VIDEO_DRIVER_X11_XVIDMODE
|
||||
#undef SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
|
||||
#undef SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
|
||||
#undef SDL_VIDEO_DRIVER_NACL
|
||||
#undef SDL_VIDEO_DRIVER_VIVANTE
|
||||
#undef SDL_VIDEO_DRIVER_VIVANTE_VDK
|
||||
#undef SDL_VIDEO_DRIVER_OS2
|
||||
#undef SDL_VIDEO_DRIVER_QNX
|
||||
#undef SDL_VIDEO_DRIVER_RISCOS
|
||||
|
||||
#undef SDL_VIDEO_RENDER_D3D
|
||||
#undef SDL_VIDEO_RENDER_D3D11
|
||||
#undef SDL_VIDEO_RENDER_OGL
|
||||
#undef SDL_VIDEO_RENDER_OGL_ES
|
||||
#undef SDL_VIDEO_RENDER_OGL_ES2
|
||||
#undef SDL_VIDEO_RENDER_DIRECTFB
|
||||
#undef SDL_VIDEO_RENDER_METAL
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#undef SDL_VIDEO_OPENGL
|
||||
#undef SDL_VIDEO_OPENGL_ES
|
||||
#undef SDL_VIDEO_OPENGL_ES2
|
||||
#undef SDL_VIDEO_OPENGL_BGL
|
||||
#undef SDL_VIDEO_OPENGL_CGL
|
||||
#undef SDL_VIDEO_OPENGL_EGL
|
||||
#undef SDL_VIDEO_OPENGL_GLX
|
||||
#undef SDL_VIDEO_OPENGL_WGL
|
||||
#undef SDL_VIDEO_OPENGL_OSMESA
|
||||
#undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC
|
||||
|
||||
/* Enable Vulkan support */
|
||||
#undef SDL_VIDEO_VULKAN
|
||||
|
||||
/* Enable Metal support */
|
||||
#undef SDL_VIDEO_METAL
|
||||
|
||||
/* Enable system power support */
|
||||
#undef SDL_POWER_LINUX
|
||||
#undef SDL_POWER_WINDOWS
|
||||
#undef SDL_POWER_MACOSX
|
||||
#undef SDL_POWER_HAIKU
|
||||
#undef SDL_POWER_ANDROID
|
||||
#undef SDL_POWER_EMSCRIPTEN
|
||||
#undef SDL_POWER_HARDWIRED
|
||||
|
||||
/* Enable system filesystem support */
|
||||
#undef SDL_FILESYSTEM_ANDROID
|
||||
#undef SDL_FILESYSTEM_HAIKU
|
||||
#undef SDL_FILESYSTEM_COCOA
|
||||
#undef SDL_FILESYSTEM_DUMMY
|
||||
#undef SDL_FILESYSTEM_RISCOS
|
||||
#undef SDL_FILESYSTEM_UNIX
|
||||
#undef SDL_FILESYSTEM_WINDOWS
|
||||
#undef SDL_FILESYSTEM_NACL
|
||||
#undef SDL_FILESYSTEM_EMSCRIPTEN
|
||||
#undef SDL_FILESYSTEM_OS2
|
||||
#undef SDL_FILESYSTEM_VITA
|
||||
#undef SDL_FILESYSTEM_PSP
|
||||
|
||||
/* Enable misc subsystem */
|
||||
#undef SDL_MISC_DUMMY
|
||||
|
||||
/* Enable locale subsystem */
|
||||
#undef SDL_LOCALE_DUMMY
|
||||
|
||||
/* Enable assembly routines */
|
||||
#undef SDL_ASSEMBLY_ROUTINES
|
||||
#undef SDL_ALTIVEC_BLITTERS
|
||||
#undef SDL_ARM_SIMD_BLITTERS
|
||||
#undef SDL_ARM_NEON_BLITTERS
|
||||
|
||||
/* Whether SDL_DYNAMIC_API needs dlopen() */
|
||||
#undef DYNAPI_NEEDS_DLOPEN
|
||||
|
||||
/* Enable ime support */
|
||||
#undef SDL_USE_IME
|
||||
|
||||
/* Enable dynamic udev support */
|
||||
#undef SDL_UDEV_DYNAMIC
|
||||
|
||||
/* Enable dynamic libusb support */
|
||||
#undef SDL_LIBUSB_DYNAMIC
|
||||
|
||||
/* Enable dynamic libsamplerate support */
|
||||
#undef SDL_LIBSAMPLERATE_DYNAMIC
|
||||
|
||||
#endif /* SDL_config_h_ */
|
||||
@@ -1,192 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_android_h_
|
||||
#define SDL_config_android_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/**
|
||||
* \file SDL_config_android.h
|
||||
*
|
||||
* This is a configuration that can be used to build SDL for Android
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_DLOPEN 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOK_R 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_ASINF 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATANF 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ATAN2F 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FLOORF 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_FMODF 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_LROUND 1
|
||||
#define HAVE_LROUNDF 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUNDF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_SYSCONF 1
|
||||
#define HAVE_CLOCK_GETTIME 1
|
||||
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_ANDROID 1
|
||||
#define SDL_AUDIO_DRIVER_OPENSLES 1
|
||||
#define SDL_AUDIO_DRIVER_AAUDIO 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_ANDROID 1
|
||||
#define SDL_JOYSTICK_HIDAPI 1
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
#define SDL_HAPTIC_ANDROID 1
|
||||
|
||||
/* Enable sensor driver */
|
||||
#define SDL_SENSOR_ANDROID 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
/* Enable various threading systems */
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
|
||||
|
||||
/* Enable various timer systems */
|
||||
#define SDL_TIMER_UNIX 1
|
||||
|
||||
/* Enable various video drivers */
|
||||
#define SDL_VIDEO_DRIVER_ANDROID 1
|
||||
|
||||
/* Enable OpenGL ES */
|
||||
#define SDL_VIDEO_OPENGL_ES 1
|
||||
#define SDL_VIDEO_OPENGL_ES2 1
|
||||
#define SDL_VIDEO_OPENGL_EGL 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
|
||||
/* Enable Vulkan support */
|
||||
/* Android does not support Vulkan in native code using the "armeabi" ABI. */
|
||||
#if defined(__ARM_ARCH) && __ARM_ARCH < 7
|
||||
#define SDL_VIDEO_VULKAN 0
|
||||
#else
|
||||
#define SDL_VIDEO_VULKAN 1
|
||||
#endif
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_ANDROID 1
|
||||
|
||||
/* Enable the filesystem driver */
|
||||
#define SDL_FILESYSTEM_ANDROID 1
|
||||
|
||||
#endif /* SDL_config_android_h_ */
|
||||
@@ -1,217 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_emscripten_h_
|
||||
#define _SDL_config_emscripten_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/**
|
||||
* \file SDL_config_emscripten.h
|
||||
*
|
||||
* This is a configuration that can be used to build SDL for Emscripten.
|
||||
*/
|
||||
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
|
||||
/* Useful headers */
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_ICONV_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MALLOC_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_WCHAR_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_DLOPEN 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_WCSLEN 1
|
||||
#define HAVE_WCSDUP 1
|
||||
#define HAVE_WCSSTR 1
|
||||
#define HAVE_WCSCMP 1
|
||||
#define HAVE_WCSNCMP 1
|
||||
#define HAVE_WCSCASECMP 1
|
||||
#define HAVE_WCSNCASECMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOK_R 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_SSCANF 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_ASINF 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATANF 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ATAN2F 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FLOORF 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_FMODF 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_LROUND 1
|
||||
#define HAVE_LROUNDF 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUNDF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE_FSEEKO 1
|
||||
#define HAVE_FSEEKO64 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SA_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_SYSCONF 1
|
||||
#define HAVE_CLOCK_GETTIME 1
|
||||
/* #undef HAVE_GETPAGESIZE */
|
||||
#define HAVE_MPROTECT 1
|
||||
#define HAVE_ICONV 1
|
||||
|
||||
/* SDL internal assertion support */
|
||||
/* #undef SDL_DEFAULT_ASSERT_LEVEL */
|
||||
|
||||
#define SDL_CPUINFO_DISABLED 1
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
#define SDL_HIDAPI_DISABLED 1
|
||||
#ifndef __EMSCRIPTEN_PTHREADS__
|
||||
#define SDL_THREADS_DISABLED 1
|
||||
#endif
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
#define SDL_AUDIO_DRIVER_EMSCRIPTEN 1
|
||||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_EMSCRIPTEN 1
|
||||
|
||||
/* Enable various sensor drivers */
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
/* Enable various threading systems */
|
||||
#ifdef __EMSCRIPTEN_PTHREADS__
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
|
||||
#endif
|
||||
|
||||
/* Enable various timer systems */
|
||||
#define SDL_TIMER_UNIX 1
|
||||
|
||||
/* Enable various video drivers */
|
||||
#define SDL_VIDEO_DRIVER_EMSCRIPTEN 1
|
||||
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
|
||||
/* Enable OpenGL support */
|
||||
/* #undef SDL_VIDEO_OPENGL */
|
||||
/* #undef SDL_VIDEO_OPENGL_ES */
|
||||
#define SDL_VIDEO_OPENGL_ES2 1
|
||||
/* #undef SDL_VIDEO_OPENGL_BGL */
|
||||
/* #undef SDL_VIDEO_OPENGL_CGL */
|
||||
/* #undef SDL_VIDEO_OPENGL_GLX */
|
||||
/* #undef SDL_VIDEO_OPENGL_WGL */
|
||||
#define SDL_VIDEO_OPENGL_EGL 1
|
||||
/* #undef SDL_VIDEO_OPENGL_OSMESA */
|
||||
/* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_EMSCRIPTEN 1
|
||||
|
||||
/* Enable system filesystem support */
|
||||
#define SDL_FILESYSTEM_EMSCRIPTEN 1
|
||||
|
||||
#endif /* _SDL_config_emscripten_h_ */
|
||||
@@ -1,215 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_iphoneos_h_
|
||||
#define SDL_config_iphoneos_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
/* The libunwind functions are only available on x86 */
|
||||
/* #undef HAVE_LIBUNWIND_H */
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_DLOPEN 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOK_R 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_ASINF 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATANF 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ATAN2F 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FLOORF 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_FMODF 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_LROUND 1
|
||||
#define HAVE_LROUNDF 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUNDF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_SYSCONF 1
|
||||
#define HAVE_SYSCTLBYNAME 1
|
||||
#define HAVE_O_CLOEXEC 1
|
||||
|
||||
/* enable iPhone version of Core Audio driver */
|
||||
#define SDL_AUDIO_DRIVER_COREAUDIO 1
|
||||
/* Enable the dummy audio driver (src/audio/dummy/\*.c) */
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
|
||||
#define SDL_HAPTIC_DUMMY 1
|
||||
|
||||
/* Enable joystick support */
|
||||
/* Only enable HIDAPI support if you want to support Steam Controllers on iOS and tvOS */
|
||||
/*#define SDL_JOYSTICK_HIDAPI 1*/
|
||||
#define SDL_JOYSTICK_MFI 1
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
|
||||
#ifdef __TVOS__
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
#else
|
||||
/* Enable the CoreMotion sensor driver */
|
||||
#define SDL_SENSOR_COREMOTION 1
|
||||
#endif
|
||||
|
||||
/* Enable Unix style SO loading */
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
/* Enable various threading systems */
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
|
||||
|
||||
/* Enable various timer systems */
|
||||
#define SDL_TIMER_UNIX 1
|
||||
|
||||
/* Supported video drivers */
|
||||
#define SDL_VIDEO_DRIVER_UIKIT 1
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable OpenGL ES */
|
||||
#if !TARGET_OS_MACCATALYST
|
||||
#define SDL_VIDEO_OPENGL_ES2 1
|
||||
#define SDL_VIDEO_OPENGL_ES 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
#endif
|
||||
|
||||
/* Metal supported on 64-bit devices running iOS 8.0 and tvOS 9.0 and newer
|
||||
Also supported in simulator from iOS 13.0 and tvOS 13.0
|
||||
*/
|
||||
#if (TARGET_OS_SIMULATOR && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) || (__TV_OS_VERSION_MIN_REQUIRED >= 130000))) || (!TARGET_CPU_ARM && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 90000)))
|
||||
#define SDL_PLATFORM_SUPPORTS_METAL 1
|
||||
#else
|
||||
#define SDL_PLATFORM_SUPPORTS_METAL 0
|
||||
#endif
|
||||
|
||||
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||
#define SDL_VIDEO_RENDER_METAL 1
|
||||
#endif
|
||||
|
||||
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||
#define SDL_VIDEO_VULKAN 1
|
||||
#endif
|
||||
|
||||
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||
#define SDL_VIDEO_METAL 1
|
||||
#endif
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_UIKIT 1
|
||||
|
||||
/* enable iPhone keyboard support */
|
||||
#define SDL_IPHONE_KEYBOARD 1
|
||||
|
||||
/* enable iOS extended launch screen */
|
||||
#define SDL_IPHONE_LAUNCHSCREEN 1
|
||||
|
||||
/* enable filesystem support */
|
||||
#define SDL_FILESYSTEM_COCOA 1
|
||||
|
||||
#endif /* SDL_config_iphoneos_h_ */
|
||||
@@ -1,280 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_macosx_h_
|
||||
#define SDL_config_macosx_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/* This gets us MAC_OS_X_VERSION_MIN_REQUIRED... */
|
||||
#include <AvailabilityMacros.h>
|
||||
|
||||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
/* Useful headers */
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_FLOAT_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_LIBUNWIND_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_DLOPEN 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOK_R 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_ASINF 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATANF 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ATAN2F 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FLOORF 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_FMODF 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_LROUND 1
|
||||
#define HAVE_LROUNDF 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUNDF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_SYSCONF 1
|
||||
#define HAVE_SYSCTLBYNAME 1
|
||||
|
||||
#if defined(__has_include) && (defined(__i386__) || defined(__x86_64))
|
||||
# if __has_include(<immintrin.h>)
|
||||
# define HAVE_IMMINTRIN_H 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= 1070)
|
||||
#define HAVE_O_CLOEXEC 1
|
||||
#endif
|
||||
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_COREAUDIO 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_HIDAPI 1
|
||||
#define SDL_JOYSTICK_IOKIT 1
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
#define SDL_HAPTIC_IOKIT 1
|
||||
|
||||
/* The MFI controller support requires ARC Objective C runtime */
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !defined(__i386__)
|
||||
#define SDL_JOYSTICK_MFI 1
|
||||
#endif
|
||||
|
||||
/* Enable the dummy sensor driver */
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
/* Enable various threading systems */
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
|
||||
|
||||
/* Enable various timer systems */
|
||||
#define SDL_TIMER_UNIX 1
|
||||
|
||||
/* Enable various video drivers */
|
||||
#define SDL_VIDEO_DRIVER_COCOA 1
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
#undef SDL_VIDEO_DRIVER_X11
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/opt/X11/lib/libX11.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/opt/X11/lib/libXext.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/opt/X11/lib/libXinerama.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/opt/X11/lib/libXi.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/opt/X11/lib/libXrandr.2.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/opt/X11/lib/libXss.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/opt/X11/lib/libXxf86vm.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_XDBE 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XRANDR 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1
|
||||
#define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1
|
||||
|
||||
#ifdef MAC_OS_X_VERSION_10_8
|
||||
/*
|
||||
* No matter the versions targeted, this is the 10.8 or later SDK, so you have
|
||||
* to use the external Xquartz, which is a more modern Xlib. Previous SDKs
|
||||
* used an older Xlib.
|
||||
*/
|
||||
#define SDL_VIDEO_DRIVER_X11_XINPUT2 1
|
||||
#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1
|
||||
#endif
|
||||
|
||||
#ifndef SDL_VIDEO_RENDER_OGL
|
||||
#define SDL_VIDEO_RENDER_OGL 1
|
||||
#endif
|
||||
|
||||
#ifndef SDL_VIDEO_RENDER_OGL_ES2
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
#endif
|
||||
|
||||
/* Metal only supported on 64-bit architectures with 10.11+ */
|
||||
#if TARGET_RT_64_BIT && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
|
||||
#define SDL_PLATFORM_SUPPORTS_METAL 1
|
||||
#else
|
||||
#define SDL_PLATFORM_SUPPORTS_METAL 0
|
||||
#endif
|
||||
|
||||
#ifndef SDL_VIDEO_RENDER_METAL
|
||||
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||
#define SDL_VIDEO_RENDER_METAL 1
|
||||
#else
|
||||
#define SDL_VIDEO_RENDER_METAL 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#ifndef SDL_VIDEO_OPENGL
|
||||
#define SDL_VIDEO_OPENGL 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_ES2
|
||||
#define SDL_VIDEO_OPENGL_ES2 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_EGL
|
||||
#define SDL_VIDEO_OPENGL_EGL 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_CGL
|
||||
#define SDL_VIDEO_OPENGL_CGL 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_GLX
|
||||
#define SDL_VIDEO_OPENGL_GLX 1
|
||||
#endif
|
||||
|
||||
/* Enable Vulkan and Metal support */
|
||||
#ifndef SDL_VIDEO_VULKAN
|
||||
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||
#define SDL_VIDEO_VULKAN 1
|
||||
#else
|
||||
#define SDL_VIDEO_VULKAN 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef SDL_VIDEO_METAL
|
||||
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||
#define SDL_VIDEO_METAL 1
|
||||
#else
|
||||
#define SDL_VIDEO_METAL 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_MACOSX 1
|
||||
|
||||
/* enable filesystem support */
|
||||
#define SDL_FILESYSTEM_COCOA 1
|
||||
|
||||
/* Enable assembly routines */
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
#ifdef __ppc__
|
||||
#define SDL_ALTIVEC_BLITTERS 1
|
||||
#endif
|
||||
|
||||
#endif /* SDL_config_macosx_h_ */
|
||||
@@ -1,205 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_os2_h_
|
||||
#define SDL_config_os2_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
#define SIZEOF_VOIDP 4
|
||||
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_OS2 1
|
||||
|
||||
#define SDL_POWER_DISABLED 1
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
#define SDL_VIDEO_DRIVER_OS2 1
|
||||
#define SDL_JOYSTICK_OS2 1
|
||||
#ifndef HAVE_LIBUSB_H /* see Makefile */
|
||||
#define SDL_HIDAPI_DISABLED 1
|
||||
/*#undef SDL_JOYSTICK_HIDAPI */
|
||||
#else
|
||||
#define SDL_JOYSTICK_HIDAPI 1
|
||||
/* dynamically loaded libusb-1.0 dll: */
|
||||
#define SDL_LIBUSB_DYNAMIC "usb100.dll"
|
||||
#endif
|
||||
/*#undef SDL_JOYSTICK_VIRTUAL */
|
||||
|
||||
/* Enable OpenGL support */
|
||||
/* #undef SDL_VIDEO_OPENGL */
|
||||
|
||||
#define SDL_THREAD_OS2 1
|
||||
#define SDL_LOADSO_OS2 1
|
||||
#define SDL_TIMER_OS2 1
|
||||
#define SDL_FILESYSTEM_OS2 1
|
||||
|
||||
/* Enable assembly routines */
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
|
||||
/* use libsamplerate for audio rate conversion. */
|
||||
/*#define HAVE_LIBSAMPLERATE_H 1 */
|
||||
|
||||
/* Enable dynamic libsamplerate support */
|
||||
#define SDL_LIBSAMPLERATE_DYNAMIC "SAMPRATE.DLL"
|
||||
|
||||
#define HAVE_LIBC 1
|
||||
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_MALLOC_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_WCHAR_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_FLOAT_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
#if 0 /* see Makefile */
|
||||
#define HAVE_ICONV 1
|
||||
#define HAVE_ICONV_H 1
|
||||
#endif
|
||||
|
||||
/* #undef HAVE_DLOPEN */
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#if defined(__WATCOMC__)
|
||||
#define HAVE__FSEEKI64 1
|
||||
#define HAVE__FTELLI64 1
|
||||
#endif
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_WCSLEN 1
|
||||
#define HAVE_WCSLCPY 1
|
||||
#define HAVE_WCSLCAT 1
|
||||
#define HAVE_WCSCMP 1
|
||||
#define HAVE__WCSICMP 1
|
||||
#define HAVE__WCSNICMP 1
|
||||
#define HAVE_WCSLEN 1
|
||||
#define HAVE_WCSLCPY 1
|
||||
#define HAVE_WCSLCAT 1
|
||||
/* #undef HAVE_WCSDUP */
|
||||
#define HAVE__WCSDUP 1
|
||||
#define HAVE_WCSSTR 1
|
||||
#define HAVE_WCSCMP 1
|
||||
#define HAVE_WCSNCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE__STRREV 1
|
||||
#define HAVE__STRUPR 1
|
||||
#define HAVE__STRLWR 1
|
||||
/* #undef HAVE_INDEX */
|
||||
/* #undef HAVE_RINDEX */
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
/* #undef HAVE_STRTOK_R */
|
||||
#define HAVE_ITOA 1
|
||||
#define HAVE__LTOA 1
|
||||
#define HAVE__ULTOA 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE__I64TOA 1
|
||||
#define HAVE__UI64TOA 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRICMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_SSCANF 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_SNPRINTF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_ACOS 1
|
||||
/* #undef HAVE_ACOSF */
|
||||
#define HAVE_ASIN 1
|
||||
/* #undef HAVE_ASINF */
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATAN2 1
|
||||
/* #undef HAVE_ATAN2F */
|
||||
#define HAVE_CEIL 1
|
||||
/* #undef HAVE_CEILF */
|
||||
/* #undef HAVE_COPYSIGN */
|
||||
/* #undef HAVE_COPYSIGNF */
|
||||
#define HAVE_COS 1
|
||||
/* #undef HAVE_COSF */
|
||||
#define HAVE_EXP 1
|
||||
/* #undef HAVE_EXPF */
|
||||
#define HAVE_FABS 1
|
||||
/* #undef HAVE_FABSF */
|
||||
#define HAVE_FLOOR 1
|
||||
/* #undef HAVE_FLOORF */
|
||||
#define HAVE_FMOD 1
|
||||
/* #undef HAVE_FMODF */
|
||||
#define HAVE_LOG 1
|
||||
/* #undef HAVE_LOGF */
|
||||
#define HAVE_LOG10 1
|
||||
/* #undef HAVE_LOG10F */
|
||||
#define HAVE_POW 1
|
||||
/* #undef HAVE_POWF */
|
||||
#define HAVE_SIN 1
|
||||
/* #undef HAVE_SINF */
|
||||
/* #undef HAVE_SCALBN */
|
||||
/* #undef HAVE_SCALBNF */
|
||||
#define HAVE_SQRT 1
|
||||
/* #undef HAVE_SQRTF */
|
||||
#define HAVE_TAN 1
|
||||
/* #undef HAVE_TANF */
|
||||
/* #undef HAVE_TRUNC */
|
||||
/* #undef HAVE_TRUNCF */
|
||||
/* #undef HAVE_LROUND */
|
||||
/* #undef HAVE_LROUNDF */
|
||||
/* #undef HAVE_ROUND */
|
||||
/* #undef HAVE_ROUNDF */
|
||||
|
||||
#endif /* SDL_config_os2_h_ */
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_pandora_h_
|
||||
#define SDL_config_pandora_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
/* General platform specific identifiers */
|
||||
#include "SDL_platform.h"
|
||||
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#define SDL_BYTEORDER 1234
|
||||
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_ICONV_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MALLOC_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
#define HAVE_DLOPEN 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LROUND 1
|
||||
#define HAVE_LROUNDF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUNDF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
#define SDL_AUDIO_DRIVER_OSS 1
|
||||
|
||||
#define SDL_INPUT_LINUXEV 1
|
||||
#define SDL_JOYSTICK_LINUX 1
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
#define SDL_HAPTIC_LINUX 1
|
||||
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1
|
||||
|
||||
#define SDL_TIMER_UNIX 1
|
||||
#define SDL_FILESYSTEM_UNIX 1
|
||||
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
#define SDL_VIDEO_DRIVER_X11 1
|
||||
#define SDL_VIDEO_DRIVER_PANDORA 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||
#define SDL_VIDEO_OPENGL_ES 1
|
||||
|
||||
#endif /* SDL_config_pandora_h_ */
|
||||
@@ -1,310 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_windows_h_
|
||||
#define SDL_config_windows_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/* winsdkver.h defines _WIN32_MAXVER for SDK version detection. It is present since at least the Windows 7 SDK,
|
||||
* but out of caution we'll only use it if the compiler supports __has_include() to confirm its presence.
|
||||
* If your compiler doesn't support __has_include() but you have winsdkver.h, define HAVE_WINSDKVER_H. */
|
||||
#if !defined(HAVE_WINSDKVER_H) && defined(__has_include)
|
||||
#if __has_include(<winsdkver.h>)
|
||||
#define HAVE_WINSDKVER_H 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WINSDKVER_H
|
||||
#include <winsdkver.h>
|
||||
#endif
|
||||
|
||||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
||||
#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__) || defined(__clang__) || defined(__BORLANDC__) || defined(__CODEGEARC__)
|
||||
#define HAVE_STDINT_H 1
|
||||
#elif defined(_MSC_VER)
|
||||
typedef signed __int8 int8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef signed __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#ifndef _UINTPTR_T_DEFINED
|
||||
#ifdef _WIN64
|
||||
typedef unsigned __int64 uintptr_t;
|
||||
#else
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif
|
||||
#define _UINTPTR_T_DEFINED
|
||||
#endif
|
||||
/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
|
||||
#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
|
||||
#define DWORD_PTR DWORD
|
||||
#endif
|
||||
#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
|
||||
#define LONG_PTR LONG
|
||||
#endif
|
||||
#else /* !__GNUC__ && !_MSC_VER */
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
#ifndef _SIZE_T_DEFINED_
|
||||
#define _SIZE_T_DEFINED_
|
||||
typedef unsigned int size_t;
|
||||
#endif
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif /* __GNUC__ || _MSC_VER */
|
||||
#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
|
||||
|
||||
#ifdef _WIN64
|
||||
# define SIZEOF_VOIDP 8
|
||||
#else
|
||||
# define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
# define HAVE_GCC_ATOMICS 1
|
||||
#endif
|
||||
|
||||
#define HAVE_DDRAW_H 1
|
||||
#define HAVE_DINPUT_H 1
|
||||
#define HAVE_DSOUND_H 1
|
||||
#define HAVE_DXGI_H 1
|
||||
#define HAVE_XINPUT_H 1
|
||||
#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0A00 /* Windows 10 SDK */
|
||||
#define HAVE_WINDOWS_GAMING_INPUT_H 1
|
||||
#endif
|
||||
#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0602 /* Windows 8 SDK */
|
||||
#define HAVE_D3D11_H 1
|
||||
#define HAVE_ROAPI_H 1
|
||||
#endif
|
||||
#define HAVE_MMDEVICEAPI_H 1
|
||||
#define HAVE_AUDIOCLIENT_H 1
|
||||
#define HAVE_TPCSHRD_H 1
|
||||
#define HAVE_SENSORSAPI_H 1
|
||||
#if (defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64)) && (defined(_MSC_VER) && _MSC_VER >= 1600)
|
||||
#define HAVE_IMMINTRIN_H 1
|
||||
#elif defined(__has_include) && (defined(__i386__) || defined(__x86_64))
|
||||
# if __has_include(<immintrin.h>)
|
||||
# define HAVE_IMMINTRIN_H 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
|
||||
#ifdef HAVE_LIBC
|
||||
/* Useful headers */
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_FLOAT_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE__STRREV 1
|
||||
/* These functions have security warnings, so we won't use them */
|
||||
/* #undef HAVE__STRUPR */
|
||||
/* #undef HAVE__STRLWR */
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
/* #undef HAVE_STRTOK_R */
|
||||
/* These functions have security warnings, so we won't use them */
|
||||
/* #undef HAVE__LTOA */
|
||||
/* #undef HAVE__ULTOA */
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE__STRICMP 1
|
||||
#define HAVE__STRNICMP 1
|
||||
#define HAVE__WCSICMP 1
|
||||
#define HAVE__WCSNICMP 1
|
||||
#define HAVE__WCSDUP 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_ASINF 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATANF 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ATAN2F 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE__COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FLOORF 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_FMODF 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#if defined(_MSC_VER)
|
||||
/* These functions were added with the VC++ 2013 C runtime library */
|
||||
#if _MSC_VER >= 1800
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_LROUND 1
|
||||
#define HAVE_LROUNDF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUNDF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#endif
|
||||
/* This function is available with at least the VC++ 2008 C runtime library */
|
||||
#if _MSC_VER >= 1400
|
||||
#define HAVE__FSEEKI64 1
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)
|
||||
#define HAVE_M_PI 1
|
||||
#endif
|
||||
#else
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#endif
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_WASAPI 1
|
||||
#define SDL_AUDIO_DRIVER_DSOUND 1
|
||||
#define SDL_AUDIO_DRIVER_WINMM 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_DINPUT 1
|
||||
#define SDL_JOYSTICK_HIDAPI 1
|
||||
#ifndef __WINRT__
|
||||
#define SDL_JOYSTICK_RAWINPUT 1
|
||||
#endif
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
#ifdef HAVE_WINDOWS_GAMING_INPUT_H
|
||||
#define SDL_JOYSTICK_WGI 1
|
||||
#endif
|
||||
#define SDL_JOYSTICK_XINPUT 1
|
||||
#define SDL_HAPTIC_DINPUT 1
|
||||
#define SDL_HAPTIC_XINPUT 1
|
||||
|
||||
/* Enable the sensor driver */
|
||||
#define SDL_SENSOR_WINDOWS 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_WINDOWS 1
|
||||
|
||||
/* Enable various threading systems */
|
||||
#define SDL_THREAD_GENERIC_COND_SUFFIX 1
|
||||
#define SDL_THREAD_WINDOWS 1
|
||||
|
||||
/* Enable various timer systems */
|
||||
#define SDL_TIMER_WINDOWS 1
|
||||
|
||||
/* Enable various video drivers */
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
#define SDL_VIDEO_DRIVER_WINDOWS 1
|
||||
|
||||
#ifndef SDL_VIDEO_RENDER_D3D
|
||||
#define SDL_VIDEO_RENDER_D3D 1
|
||||
#endif
|
||||
#if !defined(SDL_VIDEO_RENDER_D3D11) && defined(HAVE_D3D11_H)
|
||||
#define SDL_VIDEO_RENDER_D3D11 1
|
||||
#endif
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#ifndef SDL_VIDEO_OPENGL
|
||||
#define SDL_VIDEO_OPENGL 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_WGL
|
||||
#define SDL_VIDEO_OPENGL_WGL 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_RENDER_OGL
|
||||
#define SDL_VIDEO_RENDER_OGL 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_RENDER_OGL_ES2
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_ES2
|
||||
#define SDL_VIDEO_OPENGL_ES2 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_EGL
|
||||
#define SDL_VIDEO_OPENGL_EGL 1
|
||||
#endif
|
||||
|
||||
/* Enable Vulkan support */
|
||||
#define SDL_VIDEO_VULKAN 1
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_WINDOWS 1
|
||||
|
||||
/* Enable filesystem support */
|
||||
#define SDL_FILESYSTEM_WINDOWS 1
|
||||
|
||||
/* Enable assembly routines (Win64 doesn't have inline asm) */
|
||||
#ifndef _WIN64
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
#endif
|
||||
|
||||
#endif /* SDL_config_windows_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
@@ -1,264 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_winrt_h_
|
||||
#define SDL_config_winrt_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/* Make sure the Windows SDK's NTDDI_VERSION macro gets defined. This is used
|
||||
by SDL to determine which version of the Windows SDK is being used.
|
||||
*/
|
||||
#include <sdkddkver.h>
|
||||
|
||||
/* Define possibly-undefined NTDDI values (used when compiling SDL against
|
||||
older versions of the Windows SDK.
|
||||
*/
|
||||
#ifndef NTDDI_WINBLUE
|
||||
#define NTDDI_WINBLUE 0x06030000
|
||||
#endif
|
||||
#ifndef NTDDI_WIN10
|
||||
#define NTDDI_WIN10 0x0A000000
|
||||
#endif
|
||||
|
||||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
||||
#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
|
||||
#define HAVE_STDINT_H 1
|
||||
#elif defined(_MSC_VER)
|
||||
typedef signed __int8 int8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef signed __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#ifndef _UINTPTR_T_DEFINED
|
||||
#ifdef _WIN64
|
||||
typedef unsigned __int64 uintptr_t;
|
||||
#else
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif
|
||||
#define _UINTPTR_T_DEFINED
|
||||
#endif
|
||||
/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
|
||||
#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
|
||||
#define DWORD_PTR DWORD
|
||||
#endif
|
||||
#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
|
||||
#define LONG_PTR LONG
|
||||
#endif
|
||||
#else /* !__GNUC__ && !_MSC_VER */
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
#ifndef _SIZE_T_DEFINED_
|
||||
#define _SIZE_T_DEFINED_
|
||||
typedef unsigned int size_t;
|
||||
#endif
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif /* __GNUC__ || _MSC_VER */
|
||||
#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
|
||||
|
||||
#ifdef _WIN64
|
||||
# define SIZEOF_VOIDP 8
|
||||
#else
|
||||
# define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
# define HAVE_GCC_ATOMICS 1
|
||||
#endif
|
||||
|
||||
/* Useful headers */
|
||||
#define HAVE_DXGI_H 1
|
||||
#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP
|
||||
#define HAVE_XINPUT_H 1
|
||||
#endif
|
||||
|
||||
#define HAVE_MMDEVICEAPI_H 1
|
||||
#define HAVE_AUDIOCLIENT_H 1
|
||||
#define HAVE_TPCSHRD_H 1
|
||||
|
||||
#define HAVE_LIBC 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_FLOAT_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE__STRREV 1
|
||||
#define HAVE__STRUPR 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
/* #undef HAVE_STRTOLL */
|
||||
/* #undef HAVE_STRTOULL */
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE__STRICMP 1
|
||||
#define HAVE__STRNICMP 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
/* TODO, WinRT: consider using ??_s versions of the following */
|
||||
/* #undef HAVE__STRLWR */
|
||||
/* #undef HAVE_ITOA */
|
||||
/* #undef HAVE__LTOA */
|
||||
/* #undef HAVE__ULTOA */
|
||||
/* #undef HAVE_SSCANF */
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_ASINF 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATANF 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ATAN2F 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE__COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FLOORF 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_FMODF 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_LROUND 1
|
||||
#define HAVE_LROUNDF 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUNDF 1
|
||||
#define HAVE__SCALB 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE__FSEEKI64 1
|
||||
|
||||
#define HAVE_ROAPI_H 1
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_WASAPI 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable various input drivers */
|
||||
#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
#define SDL_JOYSTICK_DISABLED 1
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
#else
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
#if (NTDDI_VERSION >= NTDDI_WIN10)
|
||||
#define SDL_JOYSTICK_WGI 1
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
#else
|
||||
#define SDL_JOYSTICK_XINPUT 1
|
||||
#define SDL_HAPTIC_XINPUT 1
|
||||
#endif /* WIN10 */
|
||||
#endif
|
||||
|
||||
/* WinRT doesn't have HIDAPI available */
|
||||
#define SDL_HIDAPI_DISABLED 1
|
||||
|
||||
/* Enable the dummy sensor driver */
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_WINDOWS 1
|
||||
|
||||
/* Enable various threading systems */
|
||||
#if (NTDDI_VERSION >= NTDDI_WINBLUE)
|
||||
#define SDL_THREAD_GENERIC_COND_SUFFIX 1
|
||||
#define SDL_THREAD_WINDOWS 1
|
||||
#else
|
||||
/* WinRT on Windows 8.0 and Windows Phone 8.0 don't support CreateThread() */
|
||||
#define SDL_THREAD_STDCPP 1
|
||||
#endif
|
||||
|
||||
/* Enable various timer systems */
|
||||
#define SDL_TIMER_WINDOWS 1
|
||||
|
||||
/* Enable various video drivers */
|
||||
#define SDL_VIDEO_DRIVER_WINRT 1
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable OpenGL ES 2.0 (via a modified ANGLE library) */
|
||||
#define SDL_VIDEO_OPENGL_ES2 1
|
||||
#define SDL_VIDEO_OPENGL_EGL 1
|
||||
|
||||
/* Enable appropriate renderer(s) */
|
||||
#define SDL_VIDEO_RENDER_D3D11 1
|
||||
|
||||
#if SDL_VIDEO_OPENGL_ES2
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
#endif
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_WINRT 1
|
||||
|
||||
/* Enable assembly routines (Win64 doesn't have inline asm) */
|
||||
#ifndef _WIN64
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
#endif
|
||||
|
||||
#endif /* SDL_config_winrt_h_ */
|
||||
@@ -1,20 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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,559 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_cpuinfo.h
|
||||
*
|
||||
* CPU feature detection for SDL.
|
||||
*/
|
||||
|
||||
#ifndef SDL_cpuinfo_h_
|
||||
#define SDL_cpuinfo_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
/* Need to do this here because intrin.h has C++ code in it */
|
||||
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
|
||||
#ifdef __clang__
|
||||
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
|
||||
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
|
||||
|
||||
#ifndef __PRFCHWINTRIN_H
|
||||
#define __PRFCHWINTRIN_H
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
_m_prefetch(void *__P)
|
||||
{
|
||||
__builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
|
||||
}
|
||||
|
||||
#endif /* __PRFCHWINTRIN_H */
|
||||
#endif /* __clang__ */
|
||||
#include <intrin.h>
|
||||
#ifndef _WIN64
|
||||
#ifndef __MMX__
|
||||
#define __MMX__
|
||||
#endif
|
||||
#ifndef __3dNOW__
|
||||
#define __3dNOW__
|
||||
#endif
|
||||
#endif
|
||||
#ifndef __SSE__
|
||||
#define __SSE__
|
||||
#endif
|
||||
#ifndef __SSE2__
|
||||
#define __SSE2__
|
||||
#endif
|
||||
#ifndef __SSE3__
|
||||
#define __SSE3__
|
||||
#endif
|
||||
#elif defined(__MINGW64_VERSION_MAJOR)
|
||||
#include <intrin.h>
|
||||
#if !defined(SDL_DISABLE_ARM_NEON_H) && defined(__ARM_NEON)
|
||||
# include <arm_neon.h>
|
||||
#endif
|
||||
#else
|
||||
/* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */
|
||||
#if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)
|
||||
#include <altivec.h>
|
||||
#endif
|
||||
#if !defined(SDL_DISABLE_ARM_NEON_H)
|
||||
# if defined(__ARM_NEON)
|
||||
# include <arm_neon.h>
|
||||
# elif defined(__WINDOWS__) || defined(__WINRT__)
|
||||
/* Visual Studio doesn't define __ARM_ARCH, but _M_ARM (if set, always 7), and _M_ARM64 (if set, always 1). */
|
||||
# if defined(_M_ARM)
|
||||
# include <armintr.h>
|
||||
# include <arm_neon.h>
|
||||
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
|
||||
# endif
|
||||
# if defined (_M_ARM64)
|
||||
# include <arm64intr.h>
|
||||
# include <arm64_neon.h>
|
||||
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#endif /* compiler version */
|
||||
|
||||
#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
|
||||
#include <mm3dnow.h>
|
||||
#endif
|
||||
#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)
|
||||
#include <immintrin.h>
|
||||
#else
|
||||
#if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)
|
||||
#include <mmintrin.h>
|
||||
#endif
|
||||
#if defined(__SSE__) && !defined(SDL_DISABLE_XMMINTRIN_H)
|
||||
#include <xmmintrin.h>
|
||||
#endif
|
||||
#if defined(__SSE2__) && !defined(SDL_DISABLE_EMMINTRIN_H)
|
||||
#include <emmintrin.h>
|
||||
#endif
|
||||
#if defined(__SSE3__) && !defined(SDL_DISABLE_PMMINTRIN_H)
|
||||
#include <pmmintrin.h>
|
||||
#endif
|
||||
#endif /* HAVE_IMMINTRIN_H */
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* This is a guess for the cacheline size used for padding.
|
||||
* Most x86 processors have a 64 byte cache line.
|
||||
* The 64-bit PowerPC processors have a 128 byte cache line.
|
||||
* We'll use the larger value to be generally safe.
|
||||
*/
|
||||
#define SDL_CACHELINE_SIZE 128
|
||||
|
||||
/**
|
||||
* Get the number of CPU cores available.
|
||||
*
|
||||
* \returns the total number of logical CPU cores. On CPUs that include
|
||||
* technologies such as hyperthreading, the number of logical cores
|
||||
* may be more than the number of physical cores.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetCPUCount(void);
|
||||
|
||||
/**
|
||||
* Determine the L1 cache line size of the CPU.
|
||||
*
|
||||
* This is useful for determining multi-threaded structure padding or SIMD
|
||||
* prefetch sizes.
|
||||
*
|
||||
* \returns the L1 cache line size of the CPU, in bytes.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has the RDTSC instruction.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has the RDTSC instruction or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has AltiVec features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using PowerPC instruction
|
||||
* sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has AltiVec features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has MMX features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has MMX features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has 3DNow! features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using AMD instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has 3DNow! features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has SSE features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has SSE features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has SSE2 features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has SSE2 features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has SSE3 features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has SSE3 features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has SSE4.1 features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has SSE4.1 features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has SSE4.2 features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has SSE4.2 features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has AVX features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has AVX features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has AVX2 features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has AVX2 features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.4.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has AVX-512F (foundation) features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has AVX-512F features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.9.
|
||||
*
|
||||
* \sa SDL_HasAVX
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has ARM SIMD (ARMv6) features.
|
||||
*
|
||||
* This is different from ARM NEON, which is a different instruction set.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using ARM instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has ARM SIMD features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.12.
|
||||
*
|
||||
* \sa SDL_HasNEON
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has NEON (ARM SIMD) features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using ARM instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has ARM NEON features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
|
||||
|
||||
/**
|
||||
* Get the amount of RAM configured in the system.
|
||||
*
|
||||
* \returns the amount of RAM configured in the system in MB.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.1.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
|
||||
|
||||
/**
|
||||
* Report the alignment this system needs for SIMD allocations.
|
||||
*
|
||||
* This will return the minimum number of bytes to which a pointer must be
|
||||
* aligned to be compatible with SIMD instructions on the current machine. For
|
||||
* example, if the machine supports SSE only, it will return 16, but if it
|
||||
* supports AVX-512F, it'll return 64 (etc). This only reports values for
|
||||
* instruction sets SDL knows about, so if your SDL build doesn't have
|
||||
* SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and
|
||||
* not 64 for the AVX-512 instructions that exist but SDL doesn't know about.
|
||||
* Plan accordingly.
|
||||
*
|
||||
* \returns the alignment in bytes needed for available, known SIMD
|
||||
* instructions.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.10.
|
||||
*/
|
||||
extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
|
||||
|
||||
/**
|
||||
* Allocate memory in a SIMD-friendly way.
|
||||
*
|
||||
* This will allocate a block of memory that is suitable for use with SIMD
|
||||
* instructions. Specifically, it will be properly aligned and padded for the
|
||||
* system's supported vector instructions.
|
||||
*
|
||||
* The memory returned will be padded such that it is safe to read or write an
|
||||
* incomplete vector at the end of the memory block. This can be useful so you
|
||||
* don't have to drop back to a scalar fallback at the end of your SIMD
|
||||
* processing loop to deal with the final elements without overflowing the
|
||||
* allocated buffer.
|
||||
*
|
||||
* You must free this memory with SDL_FreeSIMD(), not free() or SDL_free() or
|
||||
* delete[], etc.
|
||||
*
|
||||
* Note that SDL will only deal with SIMD instruction sets it is aware of; for
|
||||
* example, SDL 2.0.8 knows that SSE wants 16-byte vectors (SDL_HasSSE()), and
|
||||
* AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't know that AVX-512 wants
|
||||
* 64. To be clear: if you can't decide to use an instruction set with an
|
||||
* SDL_Has*() function, don't use that instruction set with memory allocated
|
||||
* through here.
|
||||
*
|
||||
* SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't
|
||||
* out of memory, but you are not allowed to dereference it (because you only
|
||||
* own zero bytes of that buffer).
|
||||
*
|
||||
* \param len The length, in bytes, of the block to allocate. The actual
|
||||
* allocated block might be larger due to padding, etc.
|
||||
* \returns a pointer to the newly-allocated block, NULL if out of memory.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.10.
|
||||
*
|
||||
* \sa SDL_SIMDAlignment
|
||||
* \sa SDL_SIMDRealloc
|
||||
* \sa SDL_SIMDFree
|
||||
*/
|
||||
extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
|
||||
|
||||
/**
|
||||
* Reallocate memory obtained from SDL_SIMDAlloc
|
||||
*
|
||||
* It is not valid to use this function on a pointer from anything but
|
||||
* SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,
|
||||
* SDL_malloc, memalign, new[], etc.
|
||||
*
|
||||
* \param mem The pointer obtained from SDL_SIMDAlloc. This function also
|
||||
* accepts NULL, at which point this function is the same as
|
||||
* calling SDL_SIMDAlloc with a NULL pointer.
|
||||
* \param len The length, in bytes, of the block to allocated. The actual
|
||||
* allocated block might be larger due to padding, etc. Passing 0
|
||||
* will return a non-NULL pointer, assuming the system isn't out of
|
||||
* memory.
|
||||
* \returns a pointer to the newly-reallocated block, NULL if out of memory.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*
|
||||
* \sa SDL_SIMDAlignment
|
||||
* \sa SDL_SIMDAlloc
|
||||
* \sa SDL_SIMDFree
|
||||
*/
|
||||
extern DECLSPEC void * SDLCALL SDL_SIMDRealloc(void *mem, const size_t len);
|
||||
|
||||
/**
|
||||
* Deallocate memory obtained from SDL_SIMDAlloc
|
||||
*
|
||||
* It is not valid to use this function on a pointer from anything but
|
||||
* SDL_SIMDAlloc() or SDL_SIMDRealloc(). It can't be used on pointers from
|
||||
* malloc, realloc, SDL_malloc, memalign, new[], etc.
|
||||
*
|
||||
* However, SDL_SIMDFree(NULL) is a legal no-op.
|
||||
*
|
||||
* The memory pointed to by `ptr` is no longer valid for access upon return,
|
||||
* and may be returned to the system or reused by a future allocation. The
|
||||
* pointer passed to this function is no longer safe to dereference once this
|
||||
* function returns, and should be discarded.
|
||||
*
|
||||
* \param ptr The pointer, returned from SDL_SIMDAlloc or SDL_SIMDRealloc, to
|
||||
* deallocate. NULL is a legal no-op.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.10.
|
||||
*
|
||||
* \sa SDL_SIMDAlloc
|
||||
* \sa SDL_SIMDRealloc
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_cpuinfo_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
@@ -1,326 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_endian.h
|
||||
*
|
||||
* Functions for reading and writing endian-specific values
|
||||
*/
|
||||
|
||||
#ifndef SDL_endian_h_
|
||||
#define SDL_endian_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
|
||||
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
|
||||
#ifdef __clang__
|
||||
#ifndef __PRFCHWINTRIN_H
|
||||
#define __PRFCHWINTRIN_H
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
_m_prefetch(void *__P)
|
||||
{
|
||||
__builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
|
||||
}
|
||||
#endif /* __PRFCHWINTRIN_H */
|
||||
#endif /* __clang__ */
|
||||
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \name The two types of endianness
|
||||
*/
|
||||
/* @{ */
|
||||
#define SDL_LIL_ENDIAN 1234
|
||||
#define SDL_BIG_ENDIAN 4321
|
||||
/* @} */
|
||||
|
||||
#ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */
|
||||
#ifdef __linux__
|
||||
#include <endian.h>
|
||||
#define SDL_BYTEORDER __BYTE_ORDER
|
||||
#elif defined(__OpenBSD__)
|
||||
#include <endian.h>
|
||||
#define SDL_BYTEORDER BYTE_ORDER
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#include <sys/endian.h>
|
||||
#define SDL_BYTEORDER BYTE_ORDER
|
||||
/* predefs from newer gcc and clang versions: */
|
||||
#elif defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__BYTE_ORDER__)
|
||||
#if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
|
||||
#define SDL_BYTEORDER SDL_LIL_ENDIAN
|
||||
#elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
|
||||
#define SDL_BYTEORDER SDL_BIG_ENDIAN
|
||||
#else
|
||||
#error Unsupported endianness
|
||||
#endif /**/
|
||||
#else
|
||||
#if defined(__hppa__) || \
|
||||
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
|
||||
(defined(__MIPS__) && defined(__MIPSEB__)) || \
|
||||
defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \
|
||||
defined(__sparc__)
|
||||
#define SDL_BYTEORDER SDL_BIG_ENDIAN
|
||||
#else
|
||||
#define SDL_BYTEORDER SDL_LIL_ENDIAN
|
||||
#endif
|
||||
#endif /* __linux__ */
|
||||
#endif /* !SDL_BYTEORDER */
|
||||
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file SDL_endian.h
|
||||
*/
|
||||
|
||||
/* various modern compilers may have builtin swap */
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
# define HAS_BUILTIN_BSWAP16 (_SDL_HAS_BUILTIN(__builtin_bswap16)) || \
|
||||
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))
|
||||
# define HAS_BUILTIN_BSWAP32 (_SDL_HAS_BUILTIN(__builtin_bswap32)) || \
|
||||
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
|
||||
# define HAS_BUILTIN_BSWAP64 (_SDL_HAS_BUILTIN(__builtin_bswap64)) || \
|
||||
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
|
||||
|
||||
/* this one is broken */
|
||||
# define HAS_BROKEN_BSWAP (__GNUC__ == 2 && __GNUC_MINOR__ <= 95)
|
||||
#else
|
||||
# define HAS_BUILTIN_BSWAP16 0
|
||||
# define HAS_BUILTIN_BSWAP32 0
|
||||
# define HAS_BUILTIN_BSWAP64 0
|
||||
# define HAS_BROKEN_BSWAP 0
|
||||
#endif
|
||||
|
||||
#if HAS_BUILTIN_BSWAP16
|
||||
#define SDL_Swap16(x) __builtin_bswap16(x)
|
||||
#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||
#pragma intrinsic(_byteswap_ushort)
|
||||
#define SDL_Swap16(x) _byteswap_ushort(x)
|
||||
#elif defined(__i386__) && !HAS_BROKEN_BSWAP
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
__asm__("xchgb %b0,%h0": "=q"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__x86_64__)
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
__asm__("xchgb %b0,%h0": "=Q"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif (defined(__powerpc__) || defined(__ppc__))
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
int result;
|
||||
|
||||
__asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
|
||||
return (Uint16)result;
|
||||
}
|
||||
#elif (defined(__m68k__) && !defined(__mcoldfire__))
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
__asm__("rorw #8,%0": "=d"(x): "0"(x):"cc");
|
||||
return x;
|
||||
}
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
extern __inline Uint16 SDL_Swap16(Uint16);
|
||||
#pragma aux SDL_Swap16 = \
|
||||
"xchg al, ah" \
|
||||
parm [ax] \
|
||||
modify [ax];
|
||||
#else
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
return SDL_static_cast(Uint16, ((x << 8) | (x >> 8)));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAS_BUILTIN_BSWAP32
|
||||
#define SDL_Swap32(x) __builtin_bswap32(x)
|
||||
#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||
#pragma intrinsic(_byteswap_ulong)
|
||||
#define SDL_Swap32(x) _byteswap_ulong(x)
|
||||
#elif defined(__i386__) && !HAS_BROKEN_BSWAP
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
__asm__("bswap %0": "=r"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__x86_64__)
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
__asm__("bswapl %0": "=r"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif (defined(__powerpc__) || defined(__ppc__))
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
Uint32 result;
|
||||
|
||||
__asm__("rlwimi %0,%2,24,16,23": "=&r"(result): "0" (x>>24), "r"(x));
|
||||
__asm__("rlwimi %0,%2,8,8,15" : "=&r"(result): "0" (result), "r"(x));
|
||||
__asm__("rlwimi %0,%2,24,0,7" : "=&r"(result): "0" (result), "r"(x));
|
||||
return result;
|
||||
}
|
||||
#elif (defined(__m68k__) && !defined(__mcoldfire__))
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
__asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d"(x): "0"(x):"cc");
|
||||
return x;
|
||||
}
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
extern __inline Uint32 SDL_Swap32(Uint32);
|
||||
#pragma aux SDL_Swap32 = \
|
||||
"bswap eax" \
|
||||
parm [eax] \
|
||||
modify [eax];
|
||||
#else
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
return SDL_static_cast(Uint32, ((x << 24) | ((x << 8) & 0x00FF0000) |
|
||||
((x >> 8) & 0x0000FF00) | (x >> 24)));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAS_BUILTIN_BSWAP64
|
||||
#define SDL_Swap64(x) __builtin_bswap64(x)
|
||||
#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||
#pragma intrinsic(_byteswap_uint64)
|
||||
#define SDL_Swap64(x) _byteswap_uint64(x)
|
||||
#elif defined(__i386__) && !HAS_BROKEN_BSWAP
|
||||
SDL_FORCE_INLINE Uint64
|
||||
SDL_Swap64(Uint64 x)
|
||||
{
|
||||
union {
|
||||
struct {
|
||||
Uint32 a, b;
|
||||
} s;
|
||||
Uint64 u;
|
||||
} v;
|
||||
v.u = x;
|
||||
__asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
|
||||
: "=r"(v.s.a), "=r"(v.s.b)
|
||||
: "0" (v.s.a), "1"(v.s.b));
|
||||
return v.u;
|
||||
}
|
||||
#elif defined(__x86_64__)
|
||||
SDL_FORCE_INLINE Uint64
|
||||
SDL_Swap64(Uint64 x)
|
||||
{
|
||||
__asm__("bswapq %0": "=r"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
extern __inline Uint64 SDL_Swap64(Uint64);
|
||||
#pragma aux SDL_Swap64 = \
|
||||
"bswap eax" \
|
||||
"bswap edx" \
|
||||
"xchg eax,edx" \
|
||||
parm [eax edx] \
|
||||
modify [eax edx];
|
||||
#else
|
||||
SDL_FORCE_INLINE Uint64
|
||||
SDL_Swap64(Uint64 x)
|
||||
{
|
||||
Uint32 hi, lo;
|
||||
|
||||
/* Separate into high and low 32-bit values and swap them */
|
||||
lo = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
|
||||
x >>= 32;
|
||||
hi = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
|
||||
x = SDL_Swap32(lo);
|
||||
x <<= 32;
|
||||
x |= SDL_Swap32(hi);
|
||||
return (x);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
SDL_FORCE_INLINE float
|
||||
SDL_SwapFloat(float x)
|
||||
{
|
||||
union {
|
||||
float f;
|
||||
Uint32 ui32;
|
||||
} swapper;
|
||||
swapper.f = x;
|
||||
swapper.ui32 = SDL_Swap32(swapper.ui32);
|
||||
return swapper.f;
|
||||
}
|
||||
|
||||
/* remove extra macros */
|
||||
#undef HAS_BROKEN_BSWAP
|
||||
#undef HAS_BUILTIN_BSWAP16
|
||||
#undef HAS_BUILTIN_BSWAP32
|
||||
#undef HAS_BUILTIN_BSWAP64
|
||||
|
||||
/**
|
||||
* \name Swap to native
|
||||
* Byteswap item from the specified endianness to the native endianness.
|
||||
*/
|
||||
/* @{ */
|
||||
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
|
||||
#define SDL_SwapLE16(X) (X)
|
||||
#define SDL_SwapLE32(X) (X)
|
||||
#define SDL_SwapLE64(X) (X)
|
||||
#define SDL_SwapFloatLE(X) (X)
|
||||
#define SDL_SwapBE16(X) SDL_Swap16(X)
|
||||
#define SDL_SwapBE32(X) SDL_Swap32(X)
|
||||
#define SDL_SwapBE64(X) SDL_Swap64(X)
|
||||
#define SDL_SwapFloatBE(X) SDL_SwapFloat(X)
|
||||
#else
|
||||
#define SDL_SwapLE16(X) SDL_Swap16(X)
|
||||
#define SDL_SwapLE32(X) SDL_Swap32(X)
|
||||
#define SDL_SwapLE64(X) SDL_Swap64(X)
|
||||
#define SDL_SwapFloatLE(X) SDL_SwapFloat(X)
|
||||
#define SDL_SwapBE16(X) (X)
|
||||
#define SDL_SwapBE32(X) (X)
|
||||
#define SDL_SwapBE64(X) (X)
|
||||
#define SDL_SwapFloatBE(X) (X)
|
||||
#endif
|
||||
/* @} *//* Swap to native */
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_endian_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
@@ -1,163 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_error.h
|
||||
*
|
||||
* Simple error message routines for SDL.
|
||||
*/
|
||||
|
||||
#ifndef SDL_error_h_
|
||||
#define SDL_error_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Public functions */
|
||||
|
||||
|
||||
/**
|
||||
* Set the SDL error message for the current thread.
|
||||
*
|
||||
* Calling this function will replace any previous error message that was set.
|
||||
*
|
||||
* This function always returns -1, since SDL frequently uses -1 to signify an
|
||||
* failing result, leading to this idiom:
|
||||
*
|
||||
* ```c
|
||||
* if (error_code) {
|
||||
* return SDL_SetError("This operation has failed: %d", error_code);
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* \param fmt a printf()-style message format string
|
||||
* \param ... additional parameters matching % tokens in the `fmt` string, if
|
||||
* any
|
||||
* \returns always -1.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_ClearError
|
||||
* \sa SDL_GetError
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
|
||||
|
||||
/**
|
||||
* Retrieve a message about the last error that occurred on the current
|
||||
* thread.
|
||||
*
|
||||
* It is possible for multiple errors to occur before calling SDL_GetError().
|
||||
* Only the last error is returned.
|
||||
*
|
||||
* The message is only applicable when an SDL function has signaled an error.
|
||||
* You must check the return values of SDL function calls to determine when to
|
||||
* appropriately call SDL_GetError(). You should *not* use the results of
|
||||
* SDL_GetError() to decide if an error has occurred! Sometimes SDL will set
|
||||
* an error string even when reporting success.
|
||||
*
|
||||
* SDL will *not* clear the error string for successful API calls. You *must*
|
||||
* check return values for failure cases before you can assume the error
|
||||
* string applies.
|
||||
*
|
||||
* Error strings are set per-thread, so an error set in a different thread
|
||||
* will not interfere with the current thread's operation.
|
||||
*
|
||||
* The returned string is internally allocated and must not be freed by the
|
||||
* application.
|
||||
*
|
||||
* \returns a message with information about the specific error that occurred,
|
||||
* or an empty string if there hasn't been an error message set since
|
||||
* the last call to SDL_ClearError(). The message is only applicable
|
||||
* when an SDL function has signaled an error. You must check the
|
||||
* return values of SDL function calls to determine when to
|
||||
* appropriately call SDL_GetError().
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_ClearError
|
||||
* \sa SDL_SetError
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetError(void);
|
||||
|
||||
/**
|
||||
* Get the last error message that was set for the current thread.
|
||||
*
|
||||
* This allows the caller to copy the error string into a provided buffer, but
|
||||
* otherwise operates exactly the same as SDL_GetError().
|
||||
*
|
||||
* \param errstr A buffer to fill with the last error message that was set for
|
||||
* the current thread
|
||||
* \param maxlen The size of the buffer pointed to by the errstr parameter
|
||||
* \returns the pointer passed in as the `errstr` parameter.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*
|
||||
* \sa SDL_GetError
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GetErrorMsg(char *errstr, int maxlen);
|
||||
|
||||
/**
|
||||
* Clear any previous error message for this thread.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetError
|
||||
* \sa SDL_SetError
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_ClearError(void);
|
||||
|
||||
/**
|
||||
* \name Internal error functions
|
||||
*
|
||||
* \internal
|
||||
* Private error reporting function - used internally.
|
||||
*/
|
||||
/* @{ */
|
||||
#define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM)
|
||||
#define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED)
|
||||
#define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param))
|
||||
typedef enum
|
||||
{
|
||||
SDL_ENOMEM,
|
||||
SDL_EFREAD,
|
||||
SDL_EFWRITE,
|
||||
SDL_EFSEEK,
|
||||
SDL_UNSUPPORTED,
|
||||
SDL_LASTERROR
|
||||
} SDL_errorcode;
|
||||
/* SDL_Error() unconditionally returns -1. */
|
||||
extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code);
|
||||
/* @} *//* Internal error functions */
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_error_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,145 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_filesystem.h
|
||||
*
|
||||
* \brief Include file for filesystem SDL API functions
|
||||
*/
|
||||
|
||||
#ifndef SDL_filesystem_h_
|
||||
#define SDL_filesystem_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Get the directory where the application was run from.
|
||||
*
|
||||
* This is not necessarily a fast call, so you should call this once near
|
||||
* startup and save the string if you need it.
|
||||
*
|
||||
* **Mac OS X and iOS Specific Functionality**: If the application is in a
|
||||
* ".app" bundle, this function returns the Resource directory (e.g.
|
||||
* MyApp.app/Contents/Resources/). This behaviour can be overridden by adding
|
||||
* a property to the Info.plist file. Adding a string key with the name
|
||||
* SDL_FILESYSTEM_BASE_DIR_TYPE with a supported value will change the
|
||||
* behaviour.
|
||||
*
|
||||
* Supported values for the SDL_FILESYSTEM_BASE_DIR_TYPE property (Given an
|
||||
* application in /Applications/SDLApp/MyApp.app):
|
||||
*
|
||||
* - `resource`: bundle resource directory (the default). For example:
|
||||
* `/Applications/SDLApp/MyApp.app/Contents/Resources`
|
||||
* - `bundle`: the Bundle directory. For example:
|
||||
* `/Applications/SDLApp/MyApp.app/`
|
||||
* - `parent`: the containing directory of the bundle. For example:
|
||||
* `/Applications/SDLApp/`
|
||||
*
|
||||
* The returned path is guaranteed to end with a path separator ('\' on
|
||||
* Windows, '/' on most other platforms).
|
||||
*
|
||||
* The pointer returned is owned by the caller. Please call SDL_free() on the
|
||||
* pointer when done with it.
|
||||
*
|
||||
* \returns an absolute path in UTF-8 encoding to the application data
|
||||
* directory. NULL will be returned on error or when the platform
|
||||
* doesn't implement this functionality, call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.1.
|
||||
*
|
||||
* \sa SDL_GetPrefPath
|
||||
*/
|
||||
extern DECLSPEC char *SDLCALL SDL_GetBasePath(void);
|
||||
|
||||
/**
|
||||
* Get the user-and-app-specific path where files can be written.
|
||||
*
|
||||
* Get the "pref dir". This is meant to be where users can write personal
|
||||
* files (preferences and save games, etc) that are specific to your
|
||||
* application. This directory is unique per user, per application.
|
||||
*
|
||||
* This function will decide the appropriate location in the native
|
||||
* filesystem, create the directory if necessary, and return a string of the
|
||||
* absolute path to the directory in UTF-8 encoding.
|
||||
*
|
||||
* On Windows, the string might look like:
|
||||
*
|
||||
* `C:\\Users\\bob\\AppData\\Roaming\\My Company\\My Program Name\\`
|
||||
*
|
||||
* On Linux, the string might look like"
|
||||
*
|
||||
* `/home/bob/.local/share/My Program Name/`
|
||||
*
|
||||
* On Mac OS X, the string might look like:
|
||||
*
|
||||
* `/Users/bob/Library/Application Support/My Program Name/`
|
||||
*
|
||||
* You should assume the path returned by this function is the only safe place
|
||||
* to write files (and that SDL_GetBasePath(), while it might be writable, or
|
||||
* even the parent of the returned path, isn't where you should be writing
|
||||
* things).
|
||||
*
|
||||
* Both the org and app strings may become part of a directory name, so please
|
||||
* follow these rules:
|
||||
*
|
||||
* - Try to use the same org string (_including case-sensitivity_) for all
|
||||
* your applications that use this function.
|
||||
* - Always use a unique app string for each one, and make sure it never
|
||||
* changes for an app once you've decided on it.
|
||||
* - Unicode characters are legal, as long as it's UTF-8 encoded, but...
|
||||
* - ...only use letters, numbers, and spaces. Avoid punctuation like "Game
|
||||
* Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient.
|
||||
*
|
||||
* The returned path is guaranteed to end with a path separator ('\' on
|
||||
* Windows, '/' on most other platforms).
|
||||
*
|
||||
* The pointer returned is owned by the caller. Please call SDL_free() on the
|
||||
* pointer when done with it.
|
||||
*
|
||||
* \param org the name of your organization
|
||||
* \param app the name of your application
|
||||
* \returns a UTF-8 string of the user directory in platform-dependent
|
||||
* notation. NULL if there's a problem (creating directory failed,
|
||||
* etc.).
|
||||
*
|
||||
* \since This function is available since SDL 2.0.1.
|
||||
*
|
||||
* \sa SDL_GetBasePath
|
||||
*/
|
||||
extern DECLSPEC char *SDLCALL SDL_GetPrefPath(const char *org, const char *app);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_filesystem_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,451 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_hidapi.h
|
||||
*
|
||||
* Header file for SDL HIDAPI functions.
|
||||
*
|
||||
* This is an adaptation of the original HIDAPI interface by Alan Ott,
|
||||
* and includes source code licensed under the following BSD license:
|
||||
*
|
||||
Copyright (c) 2010, Alan Ott, Signal 11 Software
|
||||
All rights reserved.
|
||||
|
||||
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 Signal 11 Software 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 COPYRIGHT HOLDER 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.
|
||||
*
|
||||
* If you would like a version of SDL without this code, you can build SDL
|
||||
* with SDL_HIDAPI_DISABLED defined to 1. You might want to do this for example
|
||||
* on iOS or tvOS to avoid a dependency on the CoreBluetooth framework.
|
||||
*/
|
||||
|
||||
#ifndef SDL_hidapi_h_
|
||||
#define SDL_hidapi_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief A handle representing an open HID device
|
||||
*/
|
||||
struct SDL_hid_device_;
|
||||
typedef struct SDL_hid_device_ SDL_hid_device; /**< opaque hidapi structure */
|
||||
|
||||
/** hidapi info structure */
|
||||
/**
|
||||
* \brief Information about a connected HID device
|
||||
*/
|
||||
typedef struct SDL_hid_device_info
|
||||
{
|
||||
/** Platform-specific device path */
|
||||
char *path;
|
||||
/** Device Vendor ID */
|
||||
unsigned short vendor_id;
|
||||
/** Device Product ID */
|
||||
unsigned short product_id;
|
||||
/** Serial Number */
|
||||
wchar_t *serial_number;
|
||||
/** Device Release Number in binary-coded decimal,
|
||||
also known as Device Version Number */
|
||||
unsigned short release_number;
|
||||
/** Manufacturer String */
|
||||
wchar_t *manufacturer_string;
|
||||
/** Product string */
|
||||
wchar_t *product_string;
|
||||
/** Usage Page for this Device/Interface
|
||||
(Windows/Mac only). */
|
||||
unsigned short usage_page;
|
||||
/** Usage for this Device/Interface
|
||||
(Windows/Mac only).*/
|
||||
unsigned short usage;
|
||||
/** The USB interface which this logical device
|
||||
represents.
|
||||
|
||||
* Valid on both Linux implementations in all cases.
|
||||
* Valid on the Windows implementation only if the device
|
||||
contains more than one interface. */
|
||||
int interface_number;
|
||||
|
||||
/** Additional information about the USB interface.
|
||||
Valid on libusb and Android implementations. */
|
||||
int interface_class;
|
||||
int interface_subclass;
|
||||
int interface_protocol;
|
||||
|
||||
/** Pointer to the next device */
|
||||
struct SDL_hid_device_info *next;
|
||||
} SDL_hid_device_info;
|
||||
|
||||
|
||||
/**
|
||||
* Initialize the HIDAPI library.
|
||||
*
|
||||
* This function initializes the HIDAPI library. Calling it is not strictly
|
||||
* necessary, as it will be called automatically by SDL_hid_enumerate() and
|
||||
* any of the SDL_hid_open_*() functions if it is needed. This function should
|
||||
* be called at the beginning of execution however, if there is a chance of
|
||||
* HIDAPI handles being opened by different threads simultaneously.
|
||||
*
|
||||
* Each call to this function should have a matching call to SDL_hid_exit()
|
||||
*
|
||||
* \returns 0 on success and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
* \sa SDL_hid_exit
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_init(void);
|
||||
|
||||
/**
|
||||
* Finalize the HIDAPI library.
|
||||
*
|
||||
* This function frees all of the static data associated with HIDAPI. It
|
||||
* should be called at the end of execution to avoid memory leaks.
|
||||
*
|
||||
* \returns 0 on success and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
* \sa SDL_hid_init
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_exit(void);
|
||||
|
||||
/**
|
||||
* Check to see if devices may have been added or removed.
|
||||
*
|
||||
* Enumerating the HID devices is an expensive operation, so you can call this
|
||||
* to see if there have been any system device changes since the last call to
|
||||
* this function. A change in the counter returned doesn't necessarily mean
|
||||
* that anything has changed, but you can call SDL_hid_enumerate() to get an
|
||||
* updated device list.
|
||||
*
|
||||
* Calling this function for the first time may cause a thread or other system
|
||||
* resource to be allocated to track device change notifications.
|
||||
*
|
||||
* \returns a change counter that is incremented with each potential device
|
||||
* change, or 0 if device change detection isn't available.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
* \sa SDL_hid_enumerate
|
||||
*/
|
||||
extern DECLSPEC Uint32 SDLCALL SDL_hid_device_change_count(void);
|
||||
|
||||
/**
|
||||
* Enumerate the HID Devices.
|
||||
*
|
||||
* This function returns a linked list of all the HID devices attached to the
|
||||
* system which match vendor_id and product_id. If `vendor_id` is set to 0
|
||||
* then any vendor matches. If `product_id` is set to 0 then any product
|
||||
* matches. If `vendor_id` and `product_id` are both set to 0, then all HID
|
||||
* devices will be returned.
|
||||
*
|
||||
* \param vendor_id The Vendor ID (VID) of the types of device to open.
|
||||
* \param product_id The Product ID (PID) of the types of device to open.
|
||||
* \returns a pointer to a linked list of type SDL_hid_device_info, containing
|
||||
* information about the HID devices attached to the system, or NULL
|
||||
* in the case of failure. Free this linked list by calling
|
||||
* SDL_hid_free_enumeration().
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
* \sa SDL_hid_device_change_count
|
||||
*/
|
||||
extern DECLSPEC SDL_hid_device_info * SDLCALL SDL_hid_enumerate(unsigned short vendor_id, unsigned short product_id);
|
||||
|
||||
/**
|
||||
* Free an enumeration Linked List
|
||||
*
|
||||
* This function frees a linked list created by SDL_hid_enumerate().
|
||||
*
|
||||
* \param devs Pointer to a list of struct_device returned from
|
||||
* SDL_hid_enumerate().
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_hid_free_enumeration(SDL_hid_device_info *devs);
|
||||
|
||||
/**
|
||||
* Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally
|
||||
* a serial number.
|
||||
*
|
||||
* If `serial_number` is NULL, the first device with the specified VID and PID
|
||||
* is opened.
|
||||
*
|
||||
* \param vendor_id The Vendor ID (VID) of the device to open.
|
||||
* \param product_id The Product ID (PID) of the device to open.
|
||||
* \param serial_number The Serial Number of the device to open (Optionally
|
||||
* NULL).
|
||||
* \returns a pointer to a SDL_hid_device object on success or NULL on
|
||||
* failure.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open(unsigned short vendor_id, unsigned short product_id, const wchar_t *serial_number);
|
||||
|
||||
/**
|
||||
* Open a HID device by its path name.
|
||||
*
|
||||
* The path name be determined by calling SDL_hid_enumerate(), or a
|
||||
* platform-specific path name can be used (eg: /dev/hidraw0 on Linux).
|
||||
*
|
||||
* \param path The path name of the device to open
|
||||
* \returns a pointer to a SDL_hid_device object on success or NULL on
|
||||
* failure.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open_path(const char *path, int bExclusive /* = false */);
|
||||
|
||||
/**
|
||||
* Write an Output report to a HID device.
|
||||
*
|
||||
* The first byte of `data` must contain the Report ID. For devices which only
|
||||
* support a single report, this must be set to 0x0. The remaining bytes
|
||||
* contain the report data. Since the Report ID is mandatory, calls to
|
||||
* SDL_hid_write() will always contain one more byte than the report contains.
|
||||
* For example, if a hid report is 16 bytes long, 17 bytes must be passed to
|
||||
* SDL_hid_write(), the Report ID (or 0x0, for devices with a single report),
|
||||
* followed by the report data (16 bytes). In this example, the length passed
|
||||
* in would be 17.
|
||||
*
|
||||
* SDL_hid_write() will send the data on the first OUT endpoint, if one
|
||||
* exists. If it does not, it will send the data through the Control Endpoint
|
||||
* (Endpoint 0).
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param data The data to send, including the report number as the first
|
||||
* byte.
|
||||
* \param length The length in bytes of the data to send.
|
||||
* \returns the actual number of bytes written and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_write(SDL_hid_device *dev, const unsigned char *data, size_t length);
|
||||
|
||||
/**
|
||||
* Read an Input report from a HID device with timeout.
|
||||
*
|
||||
* Input reports are returned to the host through the INTERRUPT IN endpoint.
|
||||
* The first byte will contain the Report number if the device uses numbered
|
||||
* reports.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param data A buffer to put the read data into.
|
||||
* \param length The number of bytes to read. For devices with multiple
|
||||
* reports, make sure to read an extra byte for the report
|
||||
* number.
|
||||
* \param milliseconds timeout in milliseconds or -1 for blocking wait.
|
||||
* \returns the actual number of bytes read and -1 on error. If no packet was
|
||||
* available to be read within the timeout period, this function
|
||||
* returns 0.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_read_timeout(SDL_hid_device *dev, unsigned char *data, size_t length, int milliseconds);
|
||||
|
||||
/**
|
||||
* Read an Input report from a HID device.
|
||||
*
|
||||
* Input reports are returned to the host through the INTERRUPT IN endpoint.
|
||||
* The first byte will contain the Report number if the device uses numbered
|
||||
* reports.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param data A buffer to put the read data into.
|
||||
* \param length The number of bytes to read. For devices with multiple
|
||||
* reports, make sure to read an extra byte for the report
|
||||
* number.
|
||||
* \returns the actual number of bytes read and -1 on error. If no packet was
|
||||
* available to be read and the handle is in non-blocking mode, this
|
||||
* function returns 0.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_read(SDL_hid_device *dev, unsigned char *data, size_t length);
|
||||
|
||||
/**
|
||||
* Set the device handle to be non-blocking.
|
||||
*
|
||||
* In non-blocking mode calls to SDL_hid_read() will return immediately with a
|
||||
* value of 0 if there is no data to be read. In blocking mode, SDL_hid_read()
|
||||
* will wait (block) until there is data to read before returning.
|
||||
*
|
||||
* Nonblocking can be turned on and off at any time.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param nonblock enable or not the nonblocking reads - 1 to enable
|
||||
* nonblocking - 0 to disable nonblocking.
|
||||
* \returns 0 on success and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_set_nonblocking(SDL_hid_device *dev, int nonblock);
|
||||
|
||||
/**
|
||||
* Send a Feature report to the device.
|
||||
*
|
||||
* Feature reports are sent over the Control endpoint as a Set_Report
|
||||
* transfer. The first byte of `data` must contain the Report ID. For devices
|
||||
* which only support a single report, this must be set to 0x0. The remaining
|
||||
* bytes contain the report data. Since the Report ID is mandatory, calls to
|
||||
* SDL_hid_send_feature_report() will always contain one more byte than the
|
||||
* report contains. For example, if a hid report is 16 bytes long, 17 bytes
|
||||
* must be passed to SDL_hid_send_feature_report(): the Report ID (or 0x0, for
|
||||
* devices which do not use numbered reports), followed by the report data (16
|
||||
* bytes). In this example, the length passed in would be 17.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param data The data to send, including the report number as the first
|
||||
* byte.
|
||||
* \param length The length in bytes of the data to send, including the report
|
||||
* number.
|
||||
* \returns the actual number of bytes written and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_send_feature_report(SDL_hid_device *dev, const unsigned char *data, size_t length);
|
||||
|
||||
/**
|
||||
* Get a feature report from a HID device.
|
||||
*
|
||||
* Set the first byte of `data` to the Report ID of the report to be read.
|
||||
* Make sure to allow space for this extra byte in `data`. Upon return, the
|
||||
* first byte will still contain the Report ID, and the report data will start
|
||||
* in data[1].
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param data A buffer to put the read data into, including the Report ID.
|
||||
* Set the first byte of `data` to the Report ID of the report to
|
||||
* be read, or set it to zero if your device does not use numbered
|
||||
* reports.
|
||||
* \param length The number of bytes to read, including an extra byte for the
|
||||
* report ID. The buffer can be longer than the actual report.
|
||||
* \returns the number of bytes read plus one for the report ID (which is
|
||||
* still in the first byte), or -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_get_feature_report(SDL_hid_device *dev, unsigned char *data, size_t length);
|
||||
|
||||
/**
|
||||
* Close a HID device.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_hid_close(SDL_hid_device *dev);
|
||||
|
||||
/**
|
||||
* Get The Manufacturer String from a HID device.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param string A wide string buffer to put the data into.
|
||||
* \param maxlen The length of the buffer in multiples of wchar_t.
|
||||
* \returns 0 on success and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_get_manufacturer_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
|
||||
|
||||
/**
|
||||
* Get The Product String from a HID device.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param string A wide string buffer to put the data into.
|
||||
* \param maxlen The length of the buffer in multiples of wchar_t.
|
||||
* \returns 0 on success and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_get_product_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
|
||||
|
||||
/**
|
||||
* Get The Serial Number String from a HID device.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param string A wide string buffer to put the data into.
|
||||
* \param maxlen The length of the buffer in multiples of wchar_t.
|
||||
* \returns 0 on success and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_get_serial_number_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
|
||||
|
||||
/**
|
||||
* Get a string from a HID device, based on its string index.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param string_index The index of the string to get.
|
||||
* \param string A wide string buffer to put the data into.
|
||||
* \param maxlen The length of the buffer in multiples of wchar_t.
|
||||
* \returns 0 on success and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_get_indexed_string(SDL_hid_device *dev, int string_index, wchar_t *string, size_t maxlen);
|
||||
|
||||
/**
|
||||
* Start or stop a BLE scan on iOS and tvOS to pair Steam Controllers
|
||||
*
|
||||
* \param active SDL_TRUE to start the scan, SDL_FALSE to stop the scan
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_hid_ble_scan(SDL_bool active);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_hidapi_h_ */
|
||||
|
||||
/* vi: set sts=4 ts=4 sw=4 expandtab: */
|
||||
Loaded 100 of 1807 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user