mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-07 12:50:38 +08:00
Compare commits
2021 Commits
inotify
...
continuous
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21f4d1486c | ||
|
|
a32c702dbd | ||
|
|
23a5ed71de | ||
|
|
245dc97cfb | ||
|
|
ece204c30f | ||
|
|
1bd59096fd | ||
|
|
0b02c2c6a7 | ||
|
|
6a61a499e9 | ||
|
|
6b1c283082 | ||
|
|
5402a9611e | ||
|
|
43e06ccd45 | ||
|
|
f52c825bf5 | ||
|
|
bf8b709372 | ||
|
|
fdf82e5270 | ||
|
|
0224a1b66b | ||
|
|
505ad6d69b | ||
|
|
5bcd573821 | ||
|
|
c5a291d9c7 | ||
|
|
232a8c1148 | ||
|
|
663f6eaf5c | ||
|
|
9d3210259c | ||
|
|
4ec6c2f7cf | ||
|
|
8452bec877 | ||
|
|
0d4296e0e1 | ||
|
|
2b85da3bc9 | ||
|
|
17f194b9a3 | ||
|
|
ff47fbaedc | ||
|
|
87c88f7463 | ||
|
|
60fd5f7ab8 | ||
|
|
5ceab059dc | ||
|
|
67c898f9ad | ||
|
|
d903187eea | ||
|
|
653f0841e4 | ||
|
|
10bfadb556 | ||
|
|
0b2cc066dd | ||
|
|
60ab13d216 | ||
|
|
f90c658567 | ||
|
|
0c54895877 | ||
|
|
4eb54328f8 | ||
|
|
b1189db9c5 | ||
|
|
869578f1ba | ||
|
|
3320f776ce | ||
|
|
1d64635783 | ||
|
|
bbb076c0d4 | ||
|
|
fe2a4d0428 | ||
|
|
6bdc1941e6 | ||
|
|
9188905145 | ||
|
|
3f2fbb10d8 | ||
|
|
9c97235fe8 | ||
|
|
70a13b47db | ||
|
|
18afaf0eaf | ||
|
|
8b8c3d8116 | ||
|
|
514fc9fe43 | ||
|
|
5d8923d69c | ||
|
|
5db880af57 | ||
|
|
c05db9ce58 | ||
|
|
04079abe00 | ||
|
|
8054b69f73 | ||
|
|
b5ee777466 | ||
|
|
96f3061709 | ||
|
|
420c5a4ff3 | ||
|
|
e8f6476e8c | ||
|
|
65ec35b732 | ||
|
|
8d731b5d15 | ||
|
|
38c0dc4551 | ||
|
|
4d8cb0469f | ||
|
|
62cb8f5ba6 | ||
|
|
97c75d96d5 | ||
|
|
f5ae806b31 | ||
|
|
482dc3a5a5 | ||
|
|
a8539ac004 | ||
|
|
9970c56218 | ||
|
|
480218412a | ||
|
|
6ae09d2866 | ||
|
|
609680b328 | ||
|
|
ccbe370c8e | ||
|
|
9706e47643 | ||
|
|
d98361f782 | ||
|
|
ba7c789ec9 | ||
|
|
d128997d40 | ||
|
|
61342547ce | ||
|
|
c1a5f173b8 | ||
|
|
f5c5b7b2c8 | ||
|
|
057b47555d | ||
|
|
43299f6747 | ||
|
|
03bf6cb719 | ||
|
|
3a1bb12830 | ||
|
|
5efa68757e | ||
|
|
afaf5bf3ea | ||
|
|
50c805826f | ||
|
|
35ae9f4a64 | ||
|
|
d7d96c02a2 | ||
|
|
dd03723144 | ||
|
|
26f07196ea | ||
|
|
8c291fdfe3 | ||
|
|
d1e118f07c | ||
|
|
6c531c14e6 | ||
|
|
433213c915 | ||
|
|
ab0c0b18c2 | ||
|
|
29fd5f9fbe | ||
|
|
882d8afc93 | ||
|
|
e11635d15c | ||
|
|
5d79d93aac | ||
|
|
7ccf651fd0 | ||
|
|
67af41cce8 | ||
|
|
e2c96e62e1 | ||
|
|
2ecae442fc | ||
|
|
a1060b0eb5 | ||
|
|
ddd8de888f | ||
|
|
a758dffbc1 | ||
|
|
87775faeca | ||
|
|
ef0fc46ed8 | ||
|
|
138b4fa247 | ||
|
|
47d1f3459c | ||
|
|
4712aae834 | ||
|
|
2900ee1cde | ||
|
|
c6c4178dd2 | ||
|
|
a3ce0e6b1b | ||
|
|
0b1ad3b7f0 | ||
|
|
37fb46f092 | ||
|
|
bc8bf9a9fb | ||
|
|
9e28c98911 | ||
|
|
0a1269d52d | ||
|
|
2e5bc31c9e | ||
|
|
1b335fd945 | ||
|
|
0c8b2d007a | ||
|
|
9ee1b32e2d | ||
|
|
953ad98a16 | ||
|
|
1357057bd8 | ||
|
|
35c9323de6 | ||
|
|
13a0afef06 | ||
|
|
c7ad8e4bf6 | ||
|
|
f1754bdd5f | ||
|
|
c462a1c500 | ||
|
|
0bba184994 | ||
|
|
178602ea1f | ||
|
|
2eb8f88a20 | ||
|
|
96d11df06c | ||
|
|
950d210ec5 | ||
|
|
55c1bddac5 | ||
|
|
ac50c762d7 | ||
|
|
5c2ab150b3 | ||
|
|
0870536405 | ||
|
|
b47ede477a | ||
|
|
eef5cc17b3 | ||
|
|
ad2191333d | ||
|
|
a85cac497d | ||
|
|
e0c69d7df5 | ||
|
|
ff3d91ceb4 | ||
|
|
5777431577 | ||
|
|
cd86f80203 | ||
|
|
8c885d3f37 | ||
|
|
dddb46a6d0 | ||
|
|
6b0f378c5b | ||
|
|
9dd7f37d42 | ||
|
|
9f10fb6472 | ||
|
|
64dbccb9bd | ||
|
|
9a432a5a13 | ||
|
|
842e494fa6 | ||
|
|
7fc9ee154a | ||
|
|
5f84010c2a | ||
|
|
3dcd6cb80b | ||
|
|
79e94bf766 | ||
|
|
3de370f3d5 | ||
|
|
c84d2f4624 | ||
|
|
380a9f7a6f | ||
|
|
a6c7b67d0d | ||
|
|
c13c1f2577 | ||
|
|
151405618f | ||
|
|
70e11cc309 | ||
|
|
7619824d80 | ||
|
|
f3d181b5ee | ||
|
|
55055a70f0 | ||
|
|
22d3ba674e | ||
|
|
ac487a2133 | ||
|
|
4da3a14adc | ||
|
|
69ec810ed0 | ||
|
|
2df01316ce | ||
|
|
3a67aefee2 | ||
|
|
d114dffcb4 | ||
|
|
7bb5d9a67a | ||
|
|
a6b1e57ae1 | ||
|
|
c70c13eb5c | ||
|
|
d905ea354e | ||
|
|
99cec81894 | ||
|
|
5d5bccf1bb | ||
|
|
6fcf0a77af | ||
|
|
e7477c0abf | ||
|
|
85540855c3 | ||
|
|
2dc220b42f | ||
|
|
2d6cadbf1b | ||
|
|
340871e03a | ||
|
|
e222a74960 | ||
|
|
ab499d5095 | ||
|
|
a5f7027229 | ||
|
|
bf5cf897e2 | ||
|
|
d33c1af549 | ||
|
|
677464d04d | ||
|
|
d2d6ed8bd4 | ||
|
|
bd2a44dbdd | ||
|
|
e9ee4beb9f | ||
|
|
3b3f057f6f | ||
|
|
a9dec51e59 | ||
|
|
257312ad7c | ||
|
|
6ee8a2dfa7 | ||
|
|
75c5e9cfa7 | ||
|
|
1a94f2b585 | ||
|
|
f0b4c42c68 | ||
|
|
9be061735f | ||
|
|
6bfa525080 | ||
|
|
8fcaf18897 | ||
|
|
f558cde266 | ||
|
|
b508a33f5d | ||
|
|
b4db99006b | ||
|
|
8994f079a5 | ||
|
|
b2d184cfa5 | ||
|
|
92dc92379f | ||
|
|
2a6862ceb9 | ||
|
|
4c569e1d5f | ||
|
|
4420ffd49e | ||
|
|
fb7f57cf6a | ||
|
|
8be3bdac5d | ||
|
|
2785376bd3 | ||
|
|
d6e77e531d | ||
|
|
e686b1410d | ||
|
|
2c23a1e0a0 | ||
|
|
47eb9e8c8f | ||
|
|
712b354421 | ||
|
|
18ef4922de | ||
|
|
274f9d5846 | ||
|
|
f6fa085fe4 | ||
|
|
9ab0f04ba5 | ||
|
|
fb7854f1ef | ||
|
|
1086c31503 | ||
|
|
3a47248a09 | ||
|
|
71a333261b | ||
|
|
5ea2e295c1 | ||
|
|
1fc7547a53 | ||
|
|
a7d63649f8 | ||
|
|
2f26fcdc2a | ||
|
|
107d4cdd61 | ||
|
|
52f9aad4d0 | ||
|
|
7bb5175084 | ||
|
|
dd570b616b | ||
|
|
943a30af04 | ||
|
|
eabed60e56 | ||
|
|
f793413a79 | ||
|
|
f4a3b8571d | ||
|
|
da6586b847 | ||
|
|
4a5f34089d | ||
|
|
90da9659d1 | ||
|
|
2e30acf611 | ||
|
|
5554d13f7f | ||
|
|
a5ef33b302 | ||
|
|
9a2588f7eb | ||
|
|
cac5852e68 | ||
|
|
d52d50e283 | ||
|
|
6911da8581 | ||
|
|
e70f9a67b8 | ||
|
|
173aa7333a | ||
|
|
2396b2d4db | ||
|
|
6120c0daec | ||
|
|
790f9bde54 | ||
|
|
7a469fb481 | ||
|
|
d4a2011a59 | ||
|
|
9165832caf | ||
|
|
d274a5c13c | ||
|
|
e6bd15c68b | ||
|
|
38bef99f98 | ||
|
|
95ff9e7165 | ||
|
|
2fddbdddee | ||
|
|
465e812ed9 | ||
|
|
3b1fb79a85 | ||
|
|
0f8f35b415 | ||
|
|
a133b1c2a9 | ||
|
|
fa74acb5f0 | ||
|
|
836b4c358f | ||
|
|
982e32d108 | ||
|
|
024a335505 | ||
|
|
963cbf61e4 | ||
|
|
6d98d2c7c3 | ||
|
|
64726f13e1 | ||
|
|
85dfaaa2c2 | ||
|
|
42a915b04a | ||
|
|
42a8aa6c66 | ||
|
|
56464d3291 | ||
|
|
aed96ee753 | ||
|
|
a937320c65 | ||
|
|
a81a0cb059 | ||
|
|
5af9511505 | ||
|
|
14ae9b312d | ||
|
|
2d3e5c2e0b | ||
|
|
17950fec3e | ||
|
|
2009140da8 | ||
|
|
2a394eee62 | ||
|
|
09a7585643 | ||
|
|
a09084ceba | ||
|
|
147e5dceff | ||
|
|
3510afd30b | ||
|
|
d3586c2143 | ||
|
|
56ba2325c1 | ||
|
|
b77a4ed3a1 | ||
|
|
9b86c3127a | ||
|
|
0da7ffe45f | ||
|
|
30b78d9559 | ||
|
|
c16abc0b85 | ||
|
|
708c691cdb | ||
|
|
31c20ac4d8 | ||
|
|
1458014a29 | ||
|
|
1c84a5c8ad | ||
|
|
6728b843f7 | ||
|
|
1b55104d51 | ||
|
|
76978bfd47 | ||
|
|
6ff3231dab | ||
|
|
64716e6b42 | ||
|
|
a1191eb4ab | ||
|
|
166bed732e | ||
|
|
02cb12e4b4 | ||
|
|
159467ad44 | ||
|
|
2a006086c5 | ||
|
|
e0dc1eec93 | ||
|
|
ab130ee92c | ||
|
|
dabbe09918 | ||
|
|
296a7ac11d | ||
|
|
6bbf08893e | ||
|
|
f8b958738a | ||
|
|
1b4427f13f | ||
|
|
e55577fd26 | ||
|
|
c42960ec2a | ||
|
|
c033d4b65c | ||
|
|
dc6f03b4e4 | ||
|
|
b6967a432a | ||
|
|
7d0467863c | ||
|
|
a0b72d3995 | ||
|
|
5fe4b867f3 | ||
|
|
40af058406 | ||
|
|
b4376a6a8c | ||
|
|
457422c679 | ||
|
|
080eba948f | ||
|
|
eff86defd9 | ||
|
|
fcb463d400 | ||
|
|
efee8149e2 | ||
|
|
bc32f37fce | ||
|
|
58bfa247a4 | ||
|
|
59b9b31604 | ||
|
|
844af709c0 | ||
|
|
bb6e2d6885 | ||
|
|
6243dc7913 | ||
|
|
45c4362ae6 | ||
|
|
a0230b7e00 | ||
|
|
768755c31a | ||
|
|
3088c7f198 | ||
|
|
c8469071bf | ||
|
|
115fc301b5 | ||
|
|
bc449b8e95 | ||
|
|
74bbc0fe7e | ||
|
|
c73fa3d7a6 | ||
|
|
5694610478 | ||
|
|
ec107dfba5 | ||
|
|
64aa476330 | ||
|
|
42f6719e8d | ||
|
|
244b9dc02b | ||
|
|
fe3644a417 | ||
|
|
e18b61e041 | ||
|
|
d054782693 | ||
|
|
d56e53a347 | ||
|
|
3503c721ac | ||
|
|
0fab5f07d0 | ||
|
|
b0d12f8bf9 | ||
|
|
9fe58aaabc | ||
|
|
03c8ea14cc | ||
|
|
260edc2a08 | ||
|
|
b41591a527 | ||
|
|
4e9481451b | ||
|
|
95b48da37d | ||
|
|
1b36785177 | ||
|
|
8bc76e3d58 | ||
|
|
1a5e2b907d | ||
|
|
3717e5c2e0 | ||
|
|
33a1416199 | ||
|
|
ff4221fbe7 | ||
|
|
486bca82e8 | ||
|
|
611d07fc16 | ||
|
|
f7e12586cf | ||
|
|
f62aa051c8 | ||
|
|
2b6b898102 | ||
|
|
1dd0444531 | ||
|
|
ba9eb01c1f | ||
|
|
73a8144e75 | ||
|
|
6aef422de6 | ||
|
|
5f4b8b60cb | ||
|
|
3256236ba2 | ||
|
|
b102727320 | ||
|
|
3434005e66 | ||
|
|
b3026a7991 | ||
|
|
0a051832a8 | ||
|
|
2dbafbda02 | ||
|
|
240b6fb6f2 | ||
|
|
4163d3655a | ||
|
|
2c7bf49fc9 | ||
|
|
739592e50d | ||
|
|
393e31e509 | ||
|
|
a1dceacc8f | ||
|
|
cf26c87872 | ||
|
|
21195b3491 | ||
|
|
3f66f6a6a5 | ||
|
|
daae4f2f80 | ||
|
|
4e2708c1ac | ||
|
|
d57d8e0d5d | ||
|
|
9577a6af21 | ||
|
|
107a6aed01 | ||
|
|
2c2045d413 | ||
|
|
30fe471d2b | ||
|
|
5ab6979633 | ||
|
|
ec5e9cb6e3 | ||
|
|
f4b4546197 | ||
|
|
f047749e61 | ||
|
|
87840ce91d | ||
|
|
bf31e9f634 | ||
|
|
f86d84daed | ||
|
|
41ed920d35 | ||
|
|
df23ddb545 | ||
|
|
767556ccad | ||
|
|
f9dab2ad19 | ||
|
|
66cb3a6120 | ||
|
|
7672a370da | ||
|
|
870e47ed03 | ||
|
|
32d4bdb80f | ||
|
|
929dfd2c71 | ||
|
|
f437af6451 | ||
|
|
413a0fb2e5 | ||
|
|
793adadb06 | ||
|
|
999b43b89f | ||
|
|
bd60c88c7d | ||
|
|
23b9a2eddf | ||
|
|
0b57d97c8c | ||
|
|
6255293dd4 | ||
|
|
04136d95a3 | ||
|
|
40aa29e42a | ||
|
|
a709f30da9 | ||
|
|
0796c14e79 | ||
|
|
a9c0a4be23 | ||
|
|
3e1209d3a4 | ||
|
|
caf14c1b7c | ||
|
|
27f7d2c8d2 | ||
|
|
8ee430eda2 | ||
|
|
484e4cb225 | ||
|
|
b080ad9954 | ||
|
|
f6625d9188 | ||
|
|
1eb2816bc4 | ||
|
|
077be5aaf3 | ||
|
|
d59875f114 | ||
|
|
e89191ed39 | ||
|
|
ea21438637 | ||
|
|
0d2e8333e8 | ||
|
|
338399e622 | ||
|
|
27cab8aad5 | ||
|
|
1545a49b4c | ||
|
|
3ca15250e8 | ||
|
|
6cbac51731 | ||
|
|
e310c666b1 | ||
|
|
677b0170aa | ||
|
|
9150b770e4 | ||
|
|
2ad6511c31 | ||
|
|
0848f28d83 | ||
|
|
5d9bc950ce | ||
|
|
714da79395 | ||
|
|
823fe9ebbd | ||
|
|
4bf72b5383 | ||
|
|
51945f002b | ||
|
|
bcca9387de | ||
|
|
b8417fa46d | ||
|
|
85b0699288 | ||
|
|
6c03fb0226 | ||
|
|
a084dea07c | ||
|
|
2e0fc3e4c1 | ||
|
|
24f4d410ce | ||
|
|
052e0445ab | ||
|
|
758c908d5a | ||
|
|
3917c2589d | ||
|
|
f4a77308ec | ||
|
|
103b9724f9 | ||
|
|
75a315ecf0 | ||
|
|
63b3b9ef6d | ||
|
|
a6c2cfe89b | ||
|
|
5120657386 | ||
|
|
e754de46d1 | ||
|
|
5d718aa0d6 | ||
|
|
55fcbc8880 | ||
|
|
e19aa001b2 | ||
|
|
b447ea9c18 | ||
|
|
13274655d4 | ||
|
|
3723ac60ef | ||
|
|
da578f47f1 | ||
|
|
433e7de686 | ||
|
|
e18e9ae2ea | ||
|
|
27d5123a61 | ||
|
|
89b9f9ffe2 | ||
|
|
a17b8aaa13 | ||
|
|
e210969612 | ||
|
|
1208356b92 | ||
|
|
d7cd74fe2f | ||
|
|
31b63e9939 | ||
|
|
b99c2c2df1 | ||
|
|
94d3eff9ce | ||
|
|
b78e9961c6 | ||
|
|
b0704ca5d6 | ||
|
|
31c0934108 | ||
|
|
37083c8aef | ||
|
|
af23b0c67b | ||
|
|
a9e83fb9cf | ||
|
|
51126e1691 | ||
|
|
dd410a2de5 | ||
|
|
7ccb0b5c02 | ||
|
|
7f3e62e456 | ||
|
|
fcfc29d7ea | ||
|
|
2f3429a144 | ||
|
|
20782693f4 | ||
|
|
0cfb354374 | ||
|
|
9be5b7c6c9 | ||
|
|
e7653d2ea6 | ||
|
|
1494887e29 | ||
|
|
42dab2b1a5 | ||
|
|
36a0c1fb17 | ||
|
|
60c6767337 | ||
|
|
75451cc7fa | ||
|
|
db10035d9d | ||
|
|
de21d845ec | ||
|
|
320f8466e6 | ||
|
|
f3208e95b2 | ||
|
|
ea34bc8652 | ||
|
|
3daf014af8 | ||
|
|
ca9d3d262a | ||
|
|
a08f5e439d | ||
|
|
8f6771dff4 | ||
|
|
cd47c6b5b3 | ||
|
|
1f4f3d7fda | ||
|
|
e81b5144b3 | ||
|
|
9ec1caed53 | ||
|
|
ca3b4a9d7f | ||
|
|
87ac217887 | ||
|
|
213650db8f | ||
|
|
ac46164a6e | ||
|
|
6d12d84e94 | ||
|
|
2a18cde60c | ||
|
|
35783bcec2 | ||
|
|
1677835b45 | ||
|
|
2f2780cb1b | ||
|
|
95b134b5a6 | ||
|
|
f60e856f35 | ||
|
|
2ec0d25d85 | ||
|
|
fcd0982524 | ||
|
|
6881ee742d | ||
|
|
f070bbef3c | ||
|
|
dd8c66d90e | ||
|
|
f995d055b5 | ||
|
|
fed65dd497 | ||
|
|
c896425ad9 | ||
|
|
4107bd4e0f | ||
|
|
156b2b2b10 | ||
|
|
13a063bf7d | ||
|
|
ef786b7d79 | ||
|
|
5c0c1b1226 | ||
|
|
d041b2aa27 | ||
|
|
f6d489e038 | ||
|
|
d34fedea69 | ||
|
|
80b3f90091 | ||
|
|
2a4fafc3f9 | ||
|
|
9b3ccf5f04 | ||
|
|
f59ac2360a | ||
|
|
ff21fb42e6 | ||
|
|
288cac69de | ||
|
|
2640b6d869 | ||
|
|
d8910b0e38 | ||
|
|
049bed555e | ||
|
|
fe5944720b | ||
|
|
665c46b281 | ||
|
|
975ab6785e | ||
|
|
6fa4dbfba2 | ||
|
|
0506a1dfce | ||
|
|
908a9930e6 | ||
|
|
7d7e72196b | ||
|
|
7cc67157e5 | ||
|
|
b7ff9c7a24 | ||
|
|
aab1fa1ba2 | ||
|
|
effeba2f44 | ||
|
|
e039ef35c0 | ||
|
|
599a1f026e | ||
|
|
39cba17f01 | ||
|
|
17e106f96d | ||
|
|
081cf9132b | ||
|
|
6a7e027248 | ||
|
|
27100e7751 | ||
|
|
75d9ed341a | ||
|
|
1a0867523d | ||
|
|
7584bbe47e | ||
|
|
505b6cc264 | ||
|
|
24f23908be | ||
|
|
43bd73f37b | ||
|
|
bb2753cbfc | ||
|
|
5568eccc8a | ||
|
|
c3b2cc4423 | ||
|
|
d84130219f | ||
|
|
d97d4d6c42 | ||
|
|
15798aaf52 | ||
|
|
e53892e827 | ||
|
|
cb12af69ed | ||
|
|
e82050a4bc | ||
|
|
e4edd2da45 | ||
|
|
4f80922358 | ||
|
|
ae7ed03376 | ||
|
|
c082e46662 | ||
|
|
b0bbcab6b4 | ||
|
|
0fc83080ec | ||
|
|
73883b504f | ||
|
|
8efc9d74e8 | ||
|
|
373321ff00 | ||
|
|
a508467aac | ||
|
|
abbe993e80 | ||
|
|
c644e4d569 | ||
|
|
c200e008f1 | ||
|
|
e95a2da6d0 | ||
|
|
8afca1a79c | ||
|
|
827c9ca857 | ||
|
|
2416635ba3 | ||
|
|
39eec89580 | ||
|
|
98d88266a6 | ||
|
|
0f3359fc05 | ||
|
|
6c77608c34 | ||
|
|
abdff6eff6 | ||
|
|
95a75465c9 | ||
|
|
119926805f | ||
|
|
f749b5cb4b | ||
|
|
c29ad6b598 | ||
|
|
4c5dfb963e | ||
|
|
e11f9e05d4 | ||
|
|
5c8b5b3511 | ||
|
|
2ea7162287 | ||
|
|
e62ab51842 | ||
|
|
f1bc9b87b1 | ||
|
|
a9bddaac64 | ||
|
|
6cef6f6a75 | ||
|
|
25ea6ed500 | ||
|
|
3d5173f257 | ||
|
|
05ff0d6020 | ||
|
|
3cea12627e | ||
|
|
b59b7c1a8d | ||
|
|
dd2c369df3 | ||
|
|
8b79e49a0f | ||
|
|
4ea6eba8f2 | ||
|
|
f649076bc3 | ||
|
|
8ecffa4663 | ||
|
|
e90b83849a | ||
|
|
d517b9717a | ||
|
|
2c0d6e06be | ||
|
|
dec71850a1 | ||
|
|
b1860972c6 | ||
|
|
1f4c9b67da | ||
|
|
c2da125358 | ||
|
|
31fa990d44 | ||
|
|
d3e60c7d84 | ||
|
|
e2424b4303 | ||
|
|
240563cd1b | ||
|
|
d708cd58fb | ||
|
|
491b503f96 | ||
|
|
636a2228f6 | ||
|
|
bb03e2597c | ||
|
|
21c828ee40 | ||
|
|
132c9de142 | ||
|
|
9d9507d77f | ||
|
|
7daa6c3451 | ||
|
|
c8e1ffe0dd | ||
|
|
b5f02324a6 | ||
|
|
47f5dfdcfd | ||
|
|
33da68b013 | ||
|
|
618ec83c9d | ||
|
|
85de61ebc8 | ||
|
|
2feaae59f7 | ||
|
|
2550d7fbd3 | ||
|
|
565f717804 | ||
|
|
b56c83a2f9 | ||
|
|
bf17996f72 | ||
|
|
a3acb1c85b | ||
|
|
d4d63301e0 | ||
|
|
e9af0c9810 | ||
|
|
131ad9c790 | ||
|
|
bfcaba54dc | ||
|
|
f67736180b | ||
|
|
725b7ea7f9 | ||
|
|
600d574376 | ||
|
|
04f42df7d5 | ||
|
|
ab15662d78 | ||
|
|
072b0cef27 | ||
|
|
e274c62cfc | ||
|
|
a28d45fdb2 | ||
|
|
6ca5f7c6fb | ||
|
|
af316bff14 | ||
|
|
c8945caefc | ||
|
|
8c61a2f021 | ||
|
|
0b24810927 | ||
|
|
b3d8fb03bf | ||
|
|
02c5890c2f | ||
|
|
0579e40857 | ||
|
|
c77f290bc6 | ||
|
|
7bf9407177 | ||
|
|
b41fe076ae | ||
|
|
a7c422fde6 | ||
|
|
568a394a40 | ||
|
|
2b6a550405 | ||
|
|
7200f0da7e | ||
|
|
d3c3c26618 | ||
|
|
7152393089 | ||
|
|
661e60720d | ||
|
|
bf959da7ff | ||
|
|
75d476f9df | ||
|
|
b077822f4d | ||
|
|
6d3f188675 | ||
|
|
0231f5e8ac | ||
|
|
901b35d4b1 | ||
|
|
eaafd0ff13 | ||
|
|
963d9b8f2a | ||
|
|
5696c9c96a | ||
|
|
862b9e68be | ||
|
|
2f2890cd11 | ||
|
|
482aa840e7 | ||
|
|
4599983c8e | ||
|
|
11172838f2 | ||
|
|
47bc50b8c6 | ||
|
|
7c82766a5c | ||
|
|
5d6cf62405 | ||
|
|
edc08e39ef | ||
|
|
a9846e765d | ||
|
|
aa54309d5c | ||
|
|
443317bedf | ||
|
|
ffd320507f | ||
|
|
60df08c11c | ||
|
|
7d464df107 | ||
|
|
296f89acf9 | ||
|
|
5f31417bae | ||
|
|
150d98bd15 | ||
|
|
f162fbd806 | ||
|
|
7d8ea61ac2 | ||
|
|
40041e30eb | ||
|
|
a247e139bf | ||
|
|
00b2ca7f5a | ||
|
|
e58007aab3 | ||
|
|
dca862a838 | ||
|
|
7e71e20714 | ||
|
|
cee6862924 | ||
|
|
a8cc68f6b9 | ||
|
|
2af0adb629 | ||
|
|
628ac376ed | ||
|
|
251e6ac1dc | ||
|
|
9b6518376c | ||
|
|
6c3fee7f27 | ||
|
|
c111a59639 | ||
|
|
ba9bb70924 | ||
|
|
6acc97b0ef | ||
|
|
cd681d4303 | ||
|
|
46f30e215c | ||
|
|
2ae038c01c | ||
|
|
aaa9fbd50f | ||
|
|
51d4716bcb | ||
|
|
045caacfee | ||
|
|
95a5c670a2 | ||
|
|
30259e1573 | ||
|
|
8b884132b7 | ||
|
|
266f9a6bc6 | ||
|
|
58177d9251 | ||
|
|
69e801d6b8 | ||
|
|
388cc3061f | ||
|
|
c9d29b3955 | ||
|
|
371025dc8e | ||
|
|
cf7a79bff3 | ||
|
|
55dfa1bf44 | ||
|
|
519c8a032a | ||
|
|
c15822f375 | ||
|
|
0e91deec19 | ||
|
|
87b204c661 | ||
|
|
caefa0b7b9 | ||
|
|
a311923d4e | ||
|
|
ee4cb39f3e | ||
|
|
18436a70eb | ||
|
|
8298053e6a | ||
|
|
9304a0041d | ||
|
|
64f92003fa | ||
|
|
be0a241244 | ||
|
|
df6546d5b1 | ||
|
|
a0c31120d9 | ||
|
|
c0757bd84c | ||
|
|
9fa32a9cf4 | ||
|
|
15bc09b06b | ||
|
|
315aea1991 | ||
|
|
380422a6dc | ||
|
|
be26ecf1c9 | ||
|
|
d2bbe9dfd2 | ||
|
|
9c929c1405 | ||
|
|
9551240680 | ||
|
|
6605d0456c | ||
|
|
99e8f7b486 | ||
|
|
5ac8f63741 | ||
|
|
9d3949a948 | ||
|
|
5bd1dd34b3 | ||
|
|
6862b14e59 | ||
|
|
dc1d65f621 | ||
|
|
fba3a2b67f | ||
|
|
b946c8455d | ||
|
|
c56e876043 | ||
|
|
9773d11464 | ||
|
|
3c28b11754 | ||
|
|
f2584dcb9d | ||
|
|
ce73838f1b | ||
|
|
49f972a7c9 | ||
|
|
1ae01d89de | ||
|
|
8e54e18c8f | ||
|
|
18136e5320 | ||
|
|
a29f1899d3 | ||
|
|
0f804ffc30 | ||
|
|
620a4b4894 | ||
|
|
4cf87c2c23 | ||
|
|
f031c31b77 | ||
|
|
c2447d8634 | ||
|
|
ae9c1d9f18 | ||
|
|
0132eb6e44 | ||
|
|
f12df54226 | ||
|
|
d971055927 | ||
|
|
6059538d77 | ||
|
|
17deba0606 | ||
|
|
82a2d272ad | ||
|
|
707a9228e1 | ||
|
|
59ddfb787f | ||
|
|
acdf1da995 | ||
|
|
f1cdab91eb | ||
|
|
05d5abe4db | ||
|
|
44e017a410 | ||
|
|
64f3884f23 | ||
|
|
6386782674 | ||
|
|
8084687e50 | ||
|
|
6c16de55c0 | ||
|
|
537237ef62 | ||
|
|
4dfc3f34cb | ||
|
|
d22bbb4213 | ||
|
|
0e3b14e9a5 | ||
|
|
afb0540aa3 | ||
|
|
4d802d8901 | ||
|
|
6a4bf4965f | ||
|
|
a3c9538d12 | ||
|
|
632264809f | ||
|
|
bcfabbe802 | ||
|
|
c244cfc937 | ||
|
|
520fc33394 | ||
|
|
f705a7cd26 | ||
|
|
65bfff69d0 | ||
|
|
9d8ba03f5e | ||
|
|
778b8ede58 | ||
|
|
f8a1a2ed71 | ||
|
|
b4a7c266b5 | ||
|
|
a488f79852 | ||
|
|
b290046503 | ||
|
|
e8409cee8b | ||
|
|
1d4d355b38 | ||
|
|
dfe12535a5 | ||
|
|
74946100f1 | ||
|
|
9a1717915c | ||
|
|
3691eb6e48 | ||
|
|
3bb7471fd3 | ||
|
|
74e09ddb12 | ||
|
|
6b73d056b2 | ||
|
|
3e7847551a | ||
|
|
91d92935fa | ||
|
|
eff033298a | ||
|
|
3a8f4961bc | ||
|
|
b81f94518a | ||
|
|
96f7f5457d | ||
|
|
498ec6b4f1 | ||
|
|
607e62a1ae | ||
|
|
d41a80bc2c | ||
|
|
643bec4071 | ||
|
|
a7e84230c3 | ||
|
|
c96cf7e22d | ||
|
|
46c61660cf | ||
|
|
f6fecce52b | ||
|
|
54a5947a3c | ||
|
|
521bc675a2 | ||
|
|
845cee2578 | ||
|
|
93ceb0e4ed | ||
|
|
13aab4e59c | ||
|
|
36c2f9e9f2 | ||
|
|
514da0ffa9 | ||
|
|
37b8d5da79 | ||
|
|
b5d602d953 | ||
|
|
c926fee13c | ||
|
|
a675806c91 | ||
|
|
683c4874f8 | ||
|
|
20ced857b4 | ||
|
|
c6c86f9665 | ||
|
|
1e0107944f | ||
|
|
21797f9ac8 | ||
|
|
c800b34cd4 | ||
|
|
1612e2d669 | ||
|
|
26d229c8ca | ||
|
|
9c66e86be1 | ||
|
|
7e9f87de2d | ||
|
|
67737446ac | ||
|
|
dabed4f9eb | ||
|
|
f9b6389248 | ||
|
|
9ec1e259b4 | ||
|
|
0c2d480d89 | ||
|
|
350d8ccb7b | ||
|
|
0c512d0431 | ||
|
|
3bf55c9ea4 | ||
|
|
9994c57796 | ||
|
|
3f724b6b17 | ||
|
|
255773b4de | ||
|
|
5b73a788da | ||
|
|
748b06a00e | ||
|
|
273bccdc9a | ||
|
|
f0a2362da3 | ||
|
|
be8ade23e8 | ||
|
|
6814908d80 | ||
|
|
08dbfc45d3 | ||
|
|
89f9b3df68 | ||
|
|
40c9a2fb82 | ||
|
|
a34c22fb10 | ||
|
|
e161ff0f7a | ||
|
|
fee42eab5a | ||
|
|
2d2e03f235 | ||
|
|
4c3c3529e9 | ||
|
|
7051b844ff | ||
|
|
68377435c8 | ||
|
|
652b1804a8 | ||
|
|
e7e1677786 | ||
|
|
f330aac113 | ||
|
|
dbdd330cf7 | ||
|
|
c448c7b0b1 | ||
|
|
8d7b9c2f01 | ||
|
|
b6a235445a | ||
|
|
9fcd4baa87 | ||
|
|
fb0102eb8e | ||
|
|
9c1afaa372 | ||
|
|
1d1a6badb5 | ||
|
|
2d41c9cb15 | ||
|
|
722cbe1f02 | ||
|
|
8ac2c241c4 | ||
|
|
dd11f73951 | ||
|
|
a443547d4d | ||
|
|
7a795edeb5 | ||
|
|
a8cbfb8dda | ||
|
|
5216cccef4 | ||
|
|
a87f399e68 | ||
|
|
dd310ab851 | ||
|
|
16cc0ca0fe | ||
|
|
83d26ad233 | ||
|
|
d1f9a8f2db | ||
|
|
a2e1071808 | ||
|
|
0aa8a2891c | ||
|
|
c0ceab7513 | ||
|
|
5c90e716cb | ||
|
|
0073225549 | ||
|
|
d03a64602b | ||
|
|
d67a4234cc | ||
|
|
0d37244490 | ||
|
|
6426919cb5 | ||
|
|
0a0d63663a | ||
|
|
71b06801ef | ||
|
|
cfc7b35927 | ||
|
|
76564958d1 | ||
|
|
a464c3dd66 | ||
|
|
bd969f3594 | ||
|
|
fb87d7c0b3 | ||
|
|
a69fc87940 | ||
|
|
e481e1d73e | ||
|
|
6c0eed1b2b | ||
|
|
a6c67fdf9f | ||
|
|
03f838e37e | ||
|
|
e21fa4a910 | ||
|
|
46889ed453 | ||
|
|
882fcc152c | ||
|
|
a41902bd46 | ||
|
|
a6af32dafd | ||
|
|
d6dfb83be7 | ||
|
|
597429cf41 | ||
|
|
5ea074a1fd | ||
|
|
29c9393da3 | ||
|
|
bf6829189e | ||
|
|
a62a9429c9 | ||
|
|
f2c080e736 | ||
|
|
ea55e78855 | ||
|
|
f7c536b81c | ||
|
|
6c40104c66 | ||
|
|
4d7d592918 | ||
|
|
c5e91f299b | ||
|
|
cff276db71 | ||
|
|
30d1492b93 | ||
|
|
f07eea5073 | ||
|
|
fe407fbe00 | ||
|
|
78bc177e05 | ||
|
|
8fb908e3d4 | ||
|
|
d8b261370a | ||
|
|
a2c9ac5b1f | ||
|
|
7f9025e178 | ||
|
|
8647110a10 | ||
|
|
48e44f0057 | ||
|
|
e3934af7d1 | ||
|
|
a5ee631191 | ||
|
|
ce39255ef0 | ||
|
|
5aac5d2a52 | ||
|
|
061b50404d | ||
|
|
279cec5ae9 | ||
|
|
83a5648335 | ||
|
|
a8fc9a4c5a | ||
|
|
6f6ddbce28 | ||
|
|
4cb425d2bb | ||
|
|
bf5fd40d64 | ||
|
|
6bc613bdb4 | ||
|
|
a982562658 | ||
|
|
96a9172e36 | ||
|
|
34d7664342 | ||
|
|
b0a79df86f | ||
|
|
9e107e900c | ||
|
|
8f819a2fde | ||
|
|
3251b68df5 | ||
|
|
3ac8ad9484 | ||
|
|
b9ca0d4563 | ||
|
|
dcb3da53b0 | ||
|
|
e68b19ed1a | ||
|
|
14c7a84482 | ||
|
|
c1d1aa6787 | ||
|
|
bee81e9723 | ||
|
|
1bfb6c560a | ||
|
|
24d6f1788a | ||
|
|
fb95cc9a97 | ||
|
|
b949da291e | ||
|
|
2ecbe5b67e | ||
|
|
6634e0487c | ||
|
|
7d61b5317c | ||
|
|
201258dc9e | ||
|
|
0330569537 | ||
|
|
a1ab84a2ca | ||
|
|
2d79f3ef7a | ||
|
|
99a7e9ad87 | ||
|
|
02b8037f33 | ||
|
|
fc55a685e3 | ||
|
|
b76a75d6b4 | ||
|
|
a251600c8a | ||
|
|
c551aefd77 | ||
|
|
f343f0da41 | ||
|
|
6d318a4102 | ||
|
|
a2b992d865 | ||
|
|
ddf3f2ffdb | ||
|
|
2454e87509 | ||
|
|
0dc44249a2 | ||
|
|
150cbfa4de | ||
|
|
c0b068d81b | ||
|
|
fbc312b6cf | ||
|
|
342e0d3e2e | ||
|
|
202b228691 | ||
|
|
c9c1286803 | ||
|
|
eab98b0eda | ||
|
|
35be80fc21 | ||
|
|
6041bb0a43 | ||
|
|
c7dd9d6437 | ||
|
|
d378878c91 | ||
|
|
4a2f8cafcd | ||
|
|
d254bac16b | ||
|
|
e23b632ce5 | ||
|
|
2f321b1471 | ||
|
|
0265e88d8f | ||
|
|
4114d2f24d | ||
|
|
8124035763 | ||
|
|
96127c6eb0 | ||
|
|
cf65a39b83 | ||
|
|
0341f96b70 | ||
|
|
c95d91cfe3 | ||
|
|
cbd10c6279 | ||
|
|
5df9e57743 | ||
|
|
c178022fb5 | ||
|
|
724c29d711 | ||
|
|
74a2dbeb91 | ||
|
|
5d20d24ebc | ||
|
|
0e2fc277c8 | ||
|
|
1505740b73 | ||
|
|
6bad07b39d | ||
|
|
f85437dfc5 | ||
|
|
c765261db6 | ||
|
|
73087ead2d | ||
|
|
8c88e82709 | ||
|
|
40dd6e0234 | ||
|
|
eb23b226cc | ||
|
|
676526a518 | ||
|
|
7e0bd86b65 | ||
|
|
97489635af | ||
|
|
a9ea3976a7 | ||
|
|
5501ca927a | ||
|
|
a19fb82d66 | ||
|
|
9d032e953f | ||
|
|
38587151a9 | ||
|
|
02d5bab04b | ||
|
|
d8f3e53b1f | ||
|
|
877ed8a92a | ||
|
|
487a652aa8 | ||
|
|
64c5d141af | ||
|
|
16db8a8008 | ||
|
|
b6b14da102 | ||
|
|
a575605c75 | ||
|
|
a205a3e878 | ||
|
|
26ef3e274c | ||
|
|
33be1b7591 | ||
|
|
de19d78571 | ||
|
|
287381d5ca | ||
|
|
4acd0e5304 | ||
|
|
cb1063c305 | ||
|
|
59bfc8c32f | ||
|
|
23494f4e20 | ||
|
|
b58fbc0c94 | ||
|
|
46f38c84b5 | ||
|
|
99f290b622 | ||
|
|
680ecfefab | ||
|
|
7222c74000 | ||
|
|
1e43cb734b | ||
|
|
cb19fa2f6d | ||
|
|
73fcb84b62 | ||
|
|
3584d3d1a6 | ||
|
|
e95139af94 | ||
|
|
962f88d31b | ||
|
|
a738b2a50b | ||
|
|
34fa1b5ec8 | ||
|
|
2fdd080eef | ||
|
|
95f87e24ee | ||
|
|
bfe17fa241 | ||
|
|
a94a5f1f29 | ||
|
|
dc71456174 | ||
|
|
c6b6938e14 | ||
|
|
2823a6d269 | ||
|
|
bee35a1873 | ||
|
|
e4ae386964 | ||
|
|
36831555b9 | ||
|
|
8eef212726 | ||
|
|
1589defda1 | ||
|
|
df921d8664 | ||
|
|
f3949474b9 | ||
|
|
706ef65208 | ||
|
|
435b95fc5a | ||
|
|
aeece35291 | ||
|
|
abd7f3dca3 | ||
|
|
1c9f333420 | ||
|
|
75e5da071c | ||
|
|
52bd923d9d | ||
|
|
ab5a9eec53 | ||
|
|
88916fdac4 | ||
|
|
22f60d50ac | ||
|
|
4ed562697b | ||
|
|
64166c7d82 | ||
|
|
0df89bddeb | ||
|
|
3168e5ccf0 | ||
|
|
72fe214f49 | ||
|
|
e1cbf96100 | ||
|
|
1d6f695749 | ||
|
|
08a2d431da | ||
|
|
8bdb49516d | ||
|
|
e7f5cb6910 | ||
|
|
9968b192c3 | ||
|
|
79f2c69963 | ||
|
|
2067667c9c | ||
|
|
e017b9145f | ||
|
|
c1c27c5f18 | ||
|
|
87a56a5fa1 | ||
|
|
aee99f6094 | ||
|
|
bf03f739bb | ||
|
|
e23580c1de | ||
|
|
e49848d090 | ||
|
|
1bfc6e6705 | ||
|
|
e7c41759fb | ||
|
|
a07f81820c | ||
|
|
b39378a6da | ||
|
|
5c6b9d3235 | ||
|
|
3d49ca25b3 | ||
|
|
43fde38d88 | ||
|
|
6461fa5042 | ||
|
|
788bc820c8 | ||
|
|
36ff819daf | ||
|
|
8905883225 | ||
|
|
4031f5cb01 | ||
|
|
cd46ad19a3 | ||
|
|
6f7b1695d7 | ||
|
|
28a4b51939 | ||
|
|
5e878aae89 | ||
|
|
7e05562c14 | ||
|
|
777dd3a03c | ||
|
|
9977cb20c0 | ||
|
|
5661766c79 | ||
|
|
60d65d368a | ||
|
|
031594cc99 | ||
|
|
d4bf57c7c2 | ||
|
|
8e16c0e410 | ||
|
|
d5f4b409e8 | ||
|
|
88c560aac4 | ||
|
|
c3a6cad0c1 | ||
|
|
a862446072 | ||
|
|
8d04ae8802 | ||
|
|
0de0615eeb | ||
|
|
ea24b5f3ca | ||
|
|
eb7f19d3cf | ||
|
|
ca134a85ee | ||
|
|
00765f1ff2 | ||
|
|
013bfe5c34 | ||
|
|
5f625bb6e1 | ||
|
|
547a862024 | ||
|
|
6ea8d141d9 | ||
|
|
bdc2390d41 | ||
|
|
acc113309c | ||
|
|
5afda72290 | ||
|
|
6a7b330463 | ||
|
|
f5b9826fd9 | ||
|
|
82addf11bb | ||
|
|
aee5e46516 | ||
|
|
40e248aa63 | ||
|
|
24ee3ae318 | ||
|
|
f79aaf93f8 | ||
|
|
0d89849cab | ||
|
|
d962255ebe | ||
|
|
21b47dff32 | ||
|
|
1905782c41 | ||
|
|
b29b3d5859 | ||
|
|
3533b0d284 | ||
|
|
7e06d049f5 | ||
|
|
5a4c443c79 | ||
|
|
4bbd1e59a4 | ||
|
|
0809453b2c | ||
|
|
8350d81c18 | ||
|
|
57499dea33 | ||
|
|
6b223f1325 | ||
|
|
03a85e0caa | ||
|
|
01ad3dda2a | ||
|
|
2a05624615 | ||
|
|
f3ed9b21c0 | ||
|
|
16c87ae2c9 | ||
|
|
c16a10e6f3 | ||
|
|
c7d748e8df | ||
|
|
0e16110c3a | ||
|
|
c966589a50 | ||
|
|
4c02c25506 | ||
|
|
a4997d0647 | ||
|
|
243c3cc80f | ||
|
|
a8dbec56c3 | ||
|
|
9c62fa901f | ||
|
|
996897e30e | ||
|
|
93ee5b9446 | ||
|
|
c0c8119040 | ||
|
|
61c75b9809 | ||
|
|
868d10a842 | ||
|
|
699f3579fe | ||
|
|
873ce0ce48 | ||
|
|
450f77443d | ||
|
|
278ff22ba9 | ||
|
|
d9ef1d4608 | ||
|
|
58df771c9e | ||
|
|
a6ecc778fc | ||
|
|
37e890f326 | ||
|
|
0d6137ee40 | ||
|
|
653eb00cc6 | ||
|
|
b84aba68fa | ||
|
|
1855fab80b | ||
|
|
23f1c43282 | ||
|
|
a7c76ac0bf | ||
|
|
26959cd280 | ||
|
|
1fdf6180e6 | ||
|
|
d2237fa144 | ||
|
|
febdfacbd3 | ||
|
|
ef663a8790 | ||
|
|
ba039b8e71 | ||
|
|
02ce80981c | ||
|
|
a40a325d3c | ||
|
|
85cc942a3c | ||
|
|
a23e17c6d7 | ||
|
|
59412f3d92 | ||
|
|
0a15cc389d | ||
|
|
13f8a02cdf | ||
|
|
8caa2d142f | ||
|
|
3b8009917a | ||
|
|
e2e14945e4 | ||
|
|
16595bf2c0 | ||
|
|
f49a2bc8f3 | ||
|
|
d994c6df9a | ||
|
|
3a57f26351 | ||
|
|
7fd1534753 | ||
|
|
bd52a9ec2d | ||
|
|
9e0d389d9e | ||
|
|
8680757844 | ||
|
|
95a8d2f51f | ||
|
|
70b26a13c2 | ||
|
|
6a1f96a2c6 | ||
|
|
4ce2475602 | ||
|
|
e7ece41ba0 | ||
|
|
05579927a5 | ||
|
|
2f5b359c99 | ||
|
|
214fc7e827 | ||
|
|
df173a83ed | ||
|
|
3918bcd71c | ||
|
|
f19ed1c1c2 | ||
|
|
03ec2f603b | ||
|
|
1ee01163b7 | ||
|
|
b1d60c248d | ||
|
|
d9cbf1fa89 | ||
|
|
cd022bdac7 | ||
|
|
5d7d5319fd | ||
|
|
d4470402ee | ||
|
|
05560c7607 | ||
|
|
81c752da2b | ||
|
|
fd2ad447a8 | ||
|
|
18d55c1de2 | ||
|
|
d0d09c878f | ||
|
|
e791d44dd8 | ||
|
|
152f6d154c | ||
|
|
5627dbbf34 | ||
|
|
9cd9744407 | ||
|
|
f13c285287 | ||
|
|
cca7744f1c | ||
|
|
31ae22961b | ||
|
|
a3603f497d | ||
|
|
d36cb62a2e | ||
|
|
2ca6029e03 | ||
|
|
dee5cae5f3 | ||
|
|
ef4bc2acf2 | ||
|
|
eb61bcf76a | ||
|
|
cb43df43ef | ||
|
|
356f78ee81 | ||
|
|
275cd73ade | ||
|
|
bb1b9dad23 | ||
|
|
e27ac6b092 | ||
|
|
7333ddc1d9 | ||
|
|
fbd7d8f58a | ||
|
|
3415185dde | ||
|
|
551ea71906 | ||
|
|
1d965d7543 | ||
|
|
1d62df0e2d | ||
|
|
b0f52236bc | ||
|
|
7dcddc559c | ||
|
|
277bead9b7 | ||
|
|
d8093ec587 | ||
|
|
323626c308 | ||
|
|
68ff265e8d | ||
|
|
a3ab04e0cb | ||
|
|
7d2bf93c72 | ||
|
|
04107d384e | ||
|
|
3a0f1763fb | ||
|
|
377dd9a255 | ||
|
|
8961e37d7c | ||
|
|
de1e53311a | ||
|
|
19582cdf11 | ||
|
|
fa0e7e4369 | ||
|
|
2378331e47 | ||
|
|
5549e7301c | ||
|
|
5ab7d09a00 | ||
|
|
c54e1625d1 | ||
|
|
d0127e5e14 | ||
|
|
0f643f1f87 | ||
|
|
16eb12b1e0 | ||
|
|
4856a3c084 | ||
|
|
78e239d883 | ||
|
|
5a7b68fcc1 | ||
|
|
c33a384975 | ||
|
|
5b582b744a | ||
|
|
c96f8ba722 | ||
|
|
9f92e2a1f7 | ||
|
|
710b234493 | ||
|
|
75759530e3 | ||
|
|
5162ab62fd | ||
|
|
3e2a215c15 | ||
|
|
e2540bd446 | ||
|
|
07fd4f37ef | ||
|
|
92b72a7d33 | ||
|
|
cb3b16e2ec | ||
|
|
bd3dc71f39 | ||
|
|
48176233bd | ||
|
|
a292d2fd53 | ||
|
|
27aad9f4a0 | ||
|
|
71a3cedba8 | ||
|
|
ec2951cf45 | ||
|
|
ff436ae100 | ||
|
|
cfdfdd5c93 | ||
|
|
8b96e7ca87 | ||
|
|
1603b8028c | ||
|
|
8c7db8499f | ||
|
|
fbdd79644b | ||
|
|
ac39090f6e | ||
|
|
8f207362a5 | ||
|
|
b16fa8eddc | ||
|
|
2261b0dcab | ||
|
|
9eb49fc673 | ||
|
|
c61c84ad4f | ||
|
|
71c9fd2772 | ||
|
|
1464e1e2be | ||
|
|
cf557d191a | ||
|
|
b72033eb74 | ||
|
|
cec903fd10 | ||
|
|
b333edeefe | ||
|
|
76c7273600 | ||
|
|
096ee34f67 | ||
|
|
5b52a9a19f | ||
|
|
cacfff008f | ||
|
|
398cec626e | ||
|
|
cadad6ce34 | ||
|
|
588d080a63 | ||
|
|
1affc36f06 | ||
|
|
8d6ac3fad4 | ||
|
|
0d5d30398b | ||
|
|
eb0686fca1 | ||
|
|
41025c0049 | ||
|
|
6518a5cf8b | ||
|
|
49936120ca | ||
|
|
e4a5b95e81 | ||
|
|
84fc8d4281 | ||
|
|
e9da3e2976 | ||
|
|
c1252b5642 | ||
|
|
7d54952422 | ||
|
|
b28d10f69f | ||
|
|
6cb3b2f01a | ||
|
|
248be5458f | ||
|
|
2e7306e96a | ||
|
|
558ded6d6a | ||
|
|
c52dc69360 | ||
|
|
ba1648c689 | ||
|
|
101a7a1240 | ||
|
|
25d6b2b069 | ||
|
|
f67b97e63c | ||
|
|
9a24cb8c96 | ||
|
|
c157b7def3 | ||
|
|
de88aec958 | ||
|
|
7f31871b5a | ||
|
|
f55ef63e26 | ||
|
|
824a34ee1e | ||
|
|
46e2ccd2bf | ||
|
|
339c08d89f | ||
|
|
2db2375b4d | ||
|
|
d86ab19351 | ||
|
|
db40d58208 | ||
|
|
33ff7bbd61 | ||
|
|
4d4162336a | ||
|
|
372514151d | ||
|
|
6c9ce478a9 | ||
|
|
78555ab125 | ||
|
|
f2c671d809 | ||
|
|
4bce193645 | ||
|
|
129de871e3 | ||
|
|
c24a1fafc5 | ||
|
|
cee3757e6f | ||
|
|
12ed092446 | ||
|
|
2fb19a0cfd | ||
|
|
79624fa400 | ||
|
|
550ced9c36 | ||
|
|
fd795d5612 | ||
|
|
dc0982932b | ||
|
|
5d387101b9 | ||
|
|
eef1e1868a | ||
|
|
4005ef831a | ||
|
|
b0c71c598f | ||
|
|
d7848b7b8d | ||
|
|
9cdce1ce69 | ||
|
|
84edd9d0c4 | ||
|
|
d8355a651f | ||
|
|
004ac8105e | ||
|
|
2e8ab13242 | ||
|
|
27d9fc0afe | ||
|
|
192d510924 | ||
|
|
3614cfa878 | ||
|
|
12efcf1c44 | ||
|
|
a8de11643c | ||
|
|
597027277c | ||
|
|
48988e66bd | ||
|
|
37e3cf7e86 | ||
|
|
01e0542223 | ||
|
|
93a7ccd14f | ||
|
|
892e5c59eb | ||
|
|
c2992afb4a | ||
|
|
b99e7a6304 | ||
|
|
8888b456df | ||
|
|
53987f47e2 | ||
|
|
7cac1d290d | ||
|
|
55b048aab9 | ||
|
|
881a7edb9f | ||
|
|
6c62136f11 | ||
|
|
f34b35be5a | ||
|
|
4b5ee87de1 | ||
|
|
67903b55cc | ||
|
|
55bf0e8a53 | ||
|
|
f1487cf576 | ||
|
|
29e32310cf | ||
|
|
2ea549f250 | ||
|
|
b2ea8c9d18 | ||
|
|
6e27926a10 | ||
|
|
96c30371b7 | ||
|
|
9a42f4149f | ||
|
|
dca4226e4b | ||
|
|
b3c1c173a9 | ||
|
|
3e67445ef3 | ||
|
|
127bd89b44 | ||
|
|
3361e74f54 | ||
|
|
48e199bfa1 | ||
|
|
575179dbf5 | ||
|
|
e024a67436 | ||
|
|
e3103249f4 | ||
|
|
0746cb5365 | ||
|
|
fcda7517fe | ||
|
|
2c77f4c566 | ||
|
|
1caa276531 | ||
|
|
e673fe9a02 | ||
|
|
3ccbc7a28c | ||
|
|
8bb5ec5e26 | ||
|
|
35ff062407 | ||
|
|
ec355a83d1 | ||
|
|
182d8edb42 | ||
|
|
762e4da7a0 | ||
|
|
098c4c009b | ||
|
|
f8cf2c8953 | ||
|
|
cc6838ec97 | ||
|
|
dca637d4bb | ||
|
|
3949422430 | ||
|
|
2c8488f07a | ||
|
|
1df1fc32df | ||
|
|
eac8c116a8 | ||
|
|
a03019f5e4 | ||
|
|
714b4f45e4 | ||
|
|
68be8157ea | ||
|
|
ea2a8b6785 | ||
|
|
8c80d3b85d | ||
|
|
33c0764e65 | ||
|
|
d085c5a843 | ||
|
|
4ada40e8a8 | ||
|
|
1630d87c0d | ||
|
|
3a956a1ad3 | ||
|
|
774ced312f | ||
|
|
fec3d33dcf | ||
|
|
d4610e30fd | ||
|
|
885cda971d | ||
|
|
ef0b227967 | ||
|
|
19a785a98a | ||
|
|
b96bfcfe7a | ||
|
|
412c635499 | ||
|
|
da5ec56567 | ||
|
|
e664e80b27 | ||
|
|
d177b6f528 | ||
|
|
2ef3d78d9f | ||
|
|
5ea5e1167b | ||
|
|
116a605248 | ||
|
|
9690fe9334 | ||
|
|
a81fa84321 | ||
|
|
5ef97ae99e | ||
|
|
d667845777 | ||
|
|
b12b2aaf79 | ||
|
|
6b62f9c1b9 | ||
|
|
ba1cf25314 | ||
|
|
fb2ba6a6e2 | ||
|
|
fb6e310eab | ||
|
|
bcbd1a59c6 | ||
|
|
8e45a43ad2 | ||
|
|
115ed82c19 | ||
|
|
5c1e06ae74 | ||
|
|
f9205825b6 | ||
|
|
9040c34f48 | ||
|
|
9e9703e6de | ||
|
|
6486533355 | ||
|
|
34160151a4 | ||
|
|
daaaa324bd | ||
|
|
af5c74981b | ||
|
|
249ce6bca1 | ||
|
|
b648c74815 | ||
|
|
a2d459ae84 | ||
|
|
573781b45d | ||
|
|
3299999f3d | ||
|
|
91be4f6521 | ||
|
|
f2f21b24a1 | ||
|
|
9ef43a4794 | ||
|
|
fc02a69686 | ||
|
|
b10a0dc5c5 | ||
|
|
e5f0d1557c | ||
|
|
d8a3f4850a | ||
|
|
882d957b5c | ||
|
|
afd1727898 | ||
|
|
70a73e47a7 | ||
|
|
fe3f15ad33 | ||
|
|
66f625f840 | ||
|
|
3e1833722f | ||
|
|
4b8e11f561 | ||
|
|
0d04c20578 | ||
|
|
41c819f3d3 | ||
|
|
957154f097 | ||
|
|
fad506ef03 | ||
|
|
9150bbdfd8 | ||
|
|
aa4e2f0ae4 | ||
|
|
2bacc91922 | ||
|
|
458aa6d8b8 | ||
|
|
6963741020 | ||
|
|
b55aa982b0 | ||
|
|
492481eea8 | ||
|
|
76bff9cd4b | ||
|
|
47a6be86b1 | ||
|
|
287688d985 | ||
|
|
610d528042 | ||
|
|
89ec39821e | ||
|
|
82cfd3ecc3 | ||
|
|
5a3e3b3977 | ||
|
|
9cf6e421cb | ||
|
|
5c56b51044 | ||
|
|
577add56f1 | ||
|
|
adc5aa4659 | ||
|
|
5beed5ab29 | ||
|
|
34dd52ca90 | ||
|
|
6304b51f32 | ||
|
|
97a7de3377 | ||
|
|
7424b29e56 | ||
|
|
3c64d2ad80 | ||
|
|
1274fa13c8 | ||
|
|
3765686077 | ||
|
|
9fffd7a270 | ||
|
|
e37c07f44f | ||
|
|
214a3cce73 | ||
|
|
d738b07660 | ||
|
|
48ca8f9a70 | ||
|
|
c565b0a505 | ||
|
|
474833a3bf | ||
|
|
602f23fbdf | ||
|
|
7e9d46689c | ||
|
|
b6347d17c9 | ||
|
|
8293bc91d4 | ||
|
|
fb0f184d6b | ||
|
|
58e95c7d6f | ||
|
|
7a5381e658 | ||
|
|
375c06400c | ||
|
|
e481c86ba2 | ||
|
|
21b9f07323 | ||
|
|
0bff62e696 | ||
|
|
858597832d | ||
|
|
9b0ac7cb32 | ||
|
|
3c27384b6b | ||
|
|
1e8c26a527 | ||
|
|
f4069de7f2 | ||
|
|
e95161aa14 | ||
|
|
0984368a31 | ||
|
|
f4961d9da7 | ||
|
|
f42a174482 | ||
|
|
13bf607031 | ||
|
|
3cfdb1213b | ||
|
|
d58105d64d | ||
|
|
1bdd844860 | ||
|
|
11f3d97cd7 | ||
|
|
fccf044976 | ||
|
|
c23396f533 | ||
|
|
33c9f7118b | ||
|
|
c741ec223f | ||
|
|
d6d98bd297 | ||
|
|
5e1b5d89f7 | ||
|
|
a0edfd28b2 | ||
|
|
555fd02407 | ||
|
|
f7f9cfecfc | ||
|
|
2aeee59a31 | ||
|
|
12b8965a8c | ||
|
|
b5b6b8b785 | ||
|
|
35e073ceff | ||
|
|
b2cc96cf0d | ||
|
|
f7489a3747 | ||
|
|
0e7ebf6d44 | ||
|
|
69607d7890 | ||
|
|
4e87eb068a | ||
|
|
03a7c67731 | ||
|
|
5ba2449d10 | ||
|
|
0ee2fd8a8a | ||
|
|
080b9b30a1 | ||
|
|
749ac5ed54 | ||
|
|
6c8b9af6bb | ||
|
|
07922c0239 | ||
|
|
1a54ec92e0 | ||
|
|
663b574b8b | ||
|
|
430c51b71a | ||
|
|
20bcd03f19 | ||
|
|
dab959fc32 | ||
|
|
eff75e5d50 | ||
|
|
d103f022b4 | ||
|
|
72b8246969 | ||
|
|
030d05f018 | ||
|
|
59cd5493e7 | ||
|
|
98a7f6fa3f | ||
|
|
65095df124 | ||
|
|
ee370ea007 | ||
|
|
05016f8639 | ||
|
|
12154de6f5 | ||
|
|
3fca567b81 | ||
|
|
634574f249 | ||
|
|
f782d444a8 | ||
|
|
b68def2b9c | ||
|
|
d944301a60 | ||
|
|
15ba932046 | ||
|
|
b73c16c216 | ||
|
|
0ba4ef678c | ||
|
|
919d510f63 | ||
|
|
6557ac7fb4 | ||
|
|
87c307f47e | ||
|
|
f3e50b5500 | ||
|
|
705f252ed8 | ||
|
|
cb28101732 | ||
|
|
f87863b8bc | ||
|
|
25fb89f717 | ||
|
|
36e7856b9c | ||
|
|
34b0cdc125 | ||
|
|
25a1cb8ce7 | ||
|
|
a610b1545b | ||
|
|
30b698067a | ||
|
|
f63f1a0dc6 | ||
|
|
9cb867a7d4 | ||
|
|
00ddd95c27 | ||
|
|
0ffd1b9ff1 | ||
|
|
2109d49aa3 | ||
|
|
f910f4896c | ||
|
|
6eae3471cf | ||
|
|
c0fa91bec9 | ||
|
|
ba6dd3c751 | ||
|
|
fd63018fb5 | ||
|
|
2225915702 | ||
|
|
d14e486721 | ||
|
|
82b6da493a | ||
|
|
bec0b36bb9 | ||
|
|
e2c2821191 | ||
|
|
a19d34035d | ||
|
|
77ea03a62c | ||
|
|
402a0f129d | ||
|
|
d7116afc92 | ||
|
|
d5fe491c14 | ||
|
|
92138428c5 | ||
|
|
f3ff942ea9 | ||
|
|
ced6e8869a | ||
|
|
d7af50ea6c | ||
|
|
f7d4e5a2ea | ||
|
|
2e3788f23d | ||
|
|
eaf9a9283a | ||
|
|
ae66291272 | ||
|
|
4f78ec01cf | ||
|
|
be084d5603 | ||
|
|
aac0be1ab3 | ||
|
|
6282acc825 | ||
|
|
39fd30a472 | ||
|
|
279e391949 | ||
|
|
6df25392b8 | ||
|
|
327372e253 | ||
|
|
801dbaa387 | ||
|
|
ffd5c2d3d0 | ||
|
|
84c14b32ec | ||
|
|
c481e52558 | ||
|
|
b946ed4625 | ||
|
|
ef1572b15b | ||
|
|
aaeb18f433 | ||
|
|
dd1d86c289 | ||
|
|
16b162f7bb | ||
|
|
500ca54550 | ||
|
|
5313dc9475 | ||
|
|
9c0c1a802c | ||
|
|
fbedbdca7d | ||
|
|
6232e288e1 | ||
|
|
a6475f530b | ||
|
|
de84df99f3 | ||
|
|
a5d5c1f60b | ||
|
|
6ac3156a82 | ||
|
|
2705e77a4e | ||
|
|
a09aa31b7a | ||
|
|
9466461ce0 | ||
|
|
74ce7e9b10 | ||
|
|
10481a4ecc | ||
|
|
acd86ce490 | ||
|
|
1119a9ac22 | ||
|
|
171c0c8d3b | ||
|
|
9b5e0fef01 | ||
|
|
2f5e3b0aea | ||
|
|
ca3b0e6246 | ||
|
|
eb0459a045 | ||
|
|
5d98e13fb8 | ||
|
|
113904ea91 | ||
|
|
1dc3cc2d57 | ||
|
|
15a5975abf | ||
|
|
65debeb738 | ||
|
|
209a03a12a | ||
|
|
c28aeb2362 | ||
|
|
9152bbf106 | ||
|
|
40ba0238f8 | ||
|
|
4a3efa511c | ||
|
|
2479d28cd5 | ||
|
|
787d3bc5dd | ||
|
|
0bec78a958 | ||
|
|
e305b81df0 | ||
|
|
4cb109abe0 | ||
|
|
49a65edfc3 | ||
|
|
c6bfc82019 | ||
|
|
a4865fd2fc | ||
|
|
4bbd0cc404 | ||
|
|
4684f174ee | ||
|
|
34eb258cae | ||
|
|
b4c0ccbede | ||
|
|
51b5d7a41d | ||
|
|
15846a8ea8 | ||
|
|
e694081626 | ||
|
|
cb9605430d | ||
|
|
80507b2eca | ||
|
|
ed47346ef1 | ||
|
|
75ccd2283b | ||
|
|
409edf5a70 | ||
|
|
d047dfc319 | ||
|
|
13ed2742b2 | ||
|
|
03a3fb83b6 | ||
|
|
df1c9a5029 | ||
|
|
07e622f224 | ||
|
|
aa3a0fa392 | ||
|
|
c1287b3950 | ||
|
|
e5763e2e9a | ||
|
|
42a3c7b059 | ||
|
|
e621c98602 | ||
|
|
eb7eb4acbc | ||
|
|
e5b32fe8ac | ||
|
|
52061621ac | ||
|
|
339711c3c7 | ||
|
|
256fe7ede9 | ||
|
|
2febe632c5 | ||
|
|
c454e37064 | ||
|
|
fe1aba3561 | ||
|
|
41aa867a21 | ||
|
|
b36ebc294f | ||
|
|
3d71e5d111 | ||
|
|
ac59f25375 | ||
|
|
3393e2d95c | ||
|
|
e1ea3387ee | ||
|
|
071638794a | ||
|
|
953dd3d1a7 | ||
|
|
12bb0ca44b | ||
|
|
499cd48e83 | ||
|
|
444e08f59a | ||
|
|
9450c08eec | ||
|
|
18e68f1ab3 | ||
|
|
7555fefc18 | ||
|
|
f4fb8b4ac2 | ||
|
|
0d5cd89144 | ||
|
|
e273e09fc9 | ||
|
|
327017421c | ||
|
|
6e179346c9 | ||
|
|
ee218f36e0 | ||
|
|
f3400c983e | ||
|
|
9397301a73 | ||
|
|
f1ec612819 | ||
|
|
08f834cd82 | ||
|
|
48c17d08d9 | ||
|
|
f20fddee1c | ||
|
|
754d55beef | ||
|
|
cd813bbfbe | ||
|
|
07afbd64d4 | ||
|
|
af7d6f6fa8 | ||
|
|
cb0f513bf0 | ||
|
|
a3ef6c955c | ||
|
|
60e7a7aa23 | ||
|
|
e1431e1040 | ||
|
|
b794f2fda0 | ||
|
|
934d9ba69a | ||
|
|
9e54ddfd55 | ||
|
|
a86a24d33d | ||
|
|
fe9ed0ac9b | ||
|
|
18c94b6ec4 | ||
|
|
8fa0290e25 | ||
|
|
080cd146dd | ||
|
|
b1d910a3a5 | ||
|
|
840283d6e5 | ||
|
|
d72481e5ac | ||
|
|
dbe9309475 | ||
|
|
9fa4de6ee8 | ||
|
|
fd3c5e8384 | ||
|
|
d50ed1c087 | ||
|
|
e48133bf4b | ||
|
|
ea3bfd969c | ||
|
|
7469d6a248 | ||
|
|
859f36afce | ||
|
|
436a788ac8 | ||
|
|
5098e24806 | ||
|
|
1d8acc16f1 | ||
|
|
802c7a86a9 | ||
|
|
406eb828da | ||
|
|
0e9106685b | ||
|
|
9b001987e9 | ||
|
|
5c2c02c317 | ||
|
|
21c898d796 | ||
|
|
e48b708fa6 | ||
|
|
ccf7619ae5 | ||
|
|
eabbd0061f | ||
|
|
7d0d6b8e0d | ||
|
|
eb36fe0155 | ||
|
|
9381a40506 | ||
|
|
a19270a0dc | ||
|
|
c34ce2d9e1 | ||
|
|
58465c3727 | ||
|
|
177ed2c603 | ||
|
|
7bb994f7bc | ||
|
|
0c4f35e2d0 | ||
|
|
3287501f97 | ||
|
|
2454594a18 | ||
|
|
4daab23e2d | ||
|
|
51161004eb | ||
|
|
6477f1656e | ||
|
|
270e2a76a8 | ||
|
|
c61442e960 | ||
|
|
d0928af355 | ||
|
|
674093517e | ||
|
|
ebf3877cda | ||
|
|
e97310c441 | ||
|
|
cbe3e608b6 | ||
|
|
f30f23ba51 | ||
|
|
1ba117a8e9 | ||
|
|
d9a245dcb5 | ||
|
|
9cbf5ab6a6 | ||
|
|
c9e4e62474 | ||
|
|
aa6a1db0a9 | ||
|
|
e9d66be10a | ||
|
|
8b6f12418e | ||
|
|
7013d447ca | ||
|
|
93b2f535e2 | ||
|
|
591d572870 | ||
|
|
3ab749cc2e | ||
|
|
084fac3606 | ||
|
|
f377461fdf | ||
|
|
a2971ce939 | ||
|
|
65671d8788 | ||
|
|
809d5f1aa8 | ||
|
|
49fc6143ab | ||
|
|
8717843333 | ||
|
|
f6d8996968 | ||
|
|
9389305072 | ||
|
|
b6bd4bc6f8 | ||
|
|
4c6fbafd20 | ||
|
|
43c6175918 | ||
|
|
fcd741e2b8 | ||
|
|
89807250e5 | ||
|
|
24f7db19d8 | ||
|
|
49d93c0e76 | ||
|
|
707c93c32c | ||
|
|
e204f05726 | ||
|
|
3bd8ad50d2 | ||
|
|
3488d4e65f | ||
|
|
3da736a1eb | ||
|
|
e30c61c0e2 | ||
|
|
64e97124c3 | ||
|
|
46979419ae | ||
|
|
30d9b6d844 | ||
|
|
88045ce3be | ||
|
|
dd881d3da9 | ||
|
|
76d0608ee1 | ||
|
|
a894ca60c6 | ||
|
|
023f6712f9 | ||
|
|
42740149ac | ||
|
|
7b74015c4d | ||
|
|
57c71efe53 | ||
|
|
45de874598 | ||
|
|
aa702f0678 | ||
|
|
927dccc71d | ||
|
|
c2a24fbbce | ||
|
|
ae94a6aeba | ||
|
|
e9da43666c | ||
|
|
d27dd68072 | ||
|
|
b1ee27a3f3 | ||
|
|
32372654c2 | ||
|
|
17d0b19f9e | ||
|
|
d13f7f06e4 | ||
|
|
f469b56b93 | ||
|
|
ef74f86ce2 | ||
|
|
616cbdb1eb | ||
|
|
0a49e69818 | ||
|
|
adb8ec1da8 | ||
|
|
5d73c6cb84 | ||
|
|
afa1d429fe | ||
|
|
d1309c3aeb | ||
|
|
b35cf6e30c | ||
|
|
8cbe0e5b30 | ||
|
|
c1fe547925 | ||
|
|
1064b41ab2 | ||
|
|
2a6c2e5db4 | ||
|
|
816337a7bb | ||
|
|
d237114962 | ||
|
|
c1ca2c1a95 | ||
|
|
44a43c2c09 | ||
|
|
ee8098839e | ||
|
|
305b2579eb | ||
|
|
1a09d297ee | ||
|
|
d45e6e0ad1 | ||
|
|
2d2523df4a | ||
|
|
5a0fcfffb0 | ||
|
|
f252161d90 | ||
|
|
e0216e2658 | ||
|
|
0f2bb5720b | ||
|
|
0621e365ff | ||
|
|
8ea455def7 | ||
|
|
8cf822c426 | ||
|
|
4a009c1c2c | ||
|
|
360dc4f7ed | ||
|
|
ffe43e1f22 | ||
|
|
a52d901f25 | ||
|
|
5bae2f06ad | ||
|
|
69b0954007 | ||
|
|
0645402946 | ||
|
|
c59b244d04 | ||
|
|
5678d9a253 | ||
|
|
a520d245a6 | ||
|
|
b56f6fa330 | ||
|
|
f141869ce3 | ||
|
|
807f3852bd | ||
|
|
084089b919 | ||
|
|
f571a41cf3 | ||
|
|
686a966ff7 | ||
|
|
c29eb458ea | ||
|
|
234c843f60 | ||
|
|
2b8b3e1993 | ||
|
|
b0a889d1a1 | ||
|
|
bd1bfea695 | ||
|
|
a1299e1dfe | ||
|
|
1a5a76a201 | ||
|
|
b072b627a2 | ||
|
|
5d18c6d678 | ||
|
|
59fba30a52 | ||
|
|
193cde83b6 | ||
|
|
12bfb8f795 | ||
|
|
9ae72dbc47 |
27
.builds/alpine.yml
Normal file
27
.builds/alpine.yml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
image: alpine/latest
|
||||||
|
packages:
|
||||||
|
- build-base
|
||||||
|
- sdl2-dev
|
||||||
|
- freetype-dev
|
||||||
|
- fontconfig-dev
|
||||||
|
- opus-dev
|
||||||
|
sources:
|
||||||
|
- https://git.sr.ht/~a1batross/xash3d-fwgs
|
||||||
|
tasks:
|
||||||
|
- client: |
|
||||||
|
cd xash3d-fwgs
|
||||||
|
./waf configure -8 --enable-tests --enable-engine-tests build install --destdir=bin
|
||||||
|
- server: |
|
||||||
|
cd xash3d-fwgs
|
||||||
|
./waf configure --reconfigure --dedicated build install --destdir=bin
|
||||||
|
- run-tests: |
|
||||||
|
cd xash3d-fwgs/bin
|
||||||
|
export SDL_VIDEODRIVER=wayland
|
||||||
|
./xash3d -runtests
|
||||||
|
./xash -runtests
|
||||||
|
rm -rf valve/gameinfo.txt test_*
|
||||||
|
- package: |
|
||||||
|
cd xash3d-fwgs/bin
|
||||||
|
tar -cjvf xash3d-fwgs-alpine-amd64.tar.bz2 *
|
||||||
|
artifacts:
|
||||||
|
- xash3d-fwgs/bin/xash3d-fwgs-alpine-amd64.tar.bz2
|
||||||
30
.builds/debian-arm64.yml
Normal file
30
.builds/debian-arm64.yml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
image: debian/sid
|
||||||
|
arch: amd64
|
||||||
|
packages:
|
||||||
|
- build-essential
|
||||||
|
- python-is-python3
|
||||||
|
- libsdl2-dev
|
||||||
|
- libfreetype-dev
|
||||||
|
- libfontconfig-dev
|
||||||
|
- libopus-dev
|
||||||
|
sources:
|
||||||
|
- https://git.sr.ht/~a1batross/xash3d-fwgs
|
||||||
|
tasks:
|
||||||
|
- client: |
|
||||||
|
cd xash3d-fwgs
|
||||||
|
./waf configure -8 --enable-tests --enable-engine-tests build install --destdir=bin
|
||||||
|
- server: |
|
||||||
|
cd xash3d-fwgs
|
||||||
|
./waf configure --reconfigure --dedicated build install --destdir=bin
|
||||||
|
- run-tests: |
|
||||||
|
cd xash3d-fwgs/bin
|
||||||
|
export SDL_VIDEODRIVER=wayland
|
||||||
|
./xash3d -runtests
|
||||||
|
./xash -runtests
|
||||||
|
rm -rf valve/gameinfo.txt test_*
|
||||||
|
- package: |
|
||||||
|
cd xash3d-fwgs/bin
|
||||||
|
tar -cjvf xash3d-fwgs-debian-arm64.tar.bz2 *
|
||||||
|
artifacts:
|
||||||
|
- xash3d-fwgs/bin/xash3d-fwgs-debian-arm64.tar.bz2
|
||||||
|
|
||||||
29
.builds/debian.yml
Normal file
29
.builds/debian.yml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
image: debian/sid
|
||||||
|
packages:
|
||||||
|
- build-essential
|
||||||
|
- python-is-python3
|
||||||
|
- libsdl2-dev
|
||||||
|
- libfreetype-dev
|
||||||
|
- libfontconfig-dev
|
||||||
|
- libopus-dev
|
||||||
|
sources:
|
||||||
|
- https://git.sr.ht/~a1batross/xash3d-fwgs
|
||||||
|
tasks:
|
||||||
|
- client: |
|
||||||
|
cd xash3d-fwgs
|
||||||
|
./waf configure -8 --enable-tests --enable-engine-tests build install --destdir=bin
|
||||||
|
- server: |
|
||||||
|
cd xash3d-fwgs
|
||||||
|
./waf configure --reconfigure --dedicated build install --destdir=bin
|
||||||
|
- run-tests: |
|
||||||
|
cd xash3d-fwgs/bin
|
||||||
|
export SDL_VIDEODRIVER=wayland
|
||||||
|
./xash3d -runtests
|
||||||
|
./xash -runtests
|
||||||
|
rm -rf valve/gameinfo.txt test_*
|
||||||
|
- package: |
|
||||||
|
cd xash3d-fwgs/bin
|
||||||
|
tar -cjvf xash3d-fwgs-debian-amd64.tar.bz2 *
|
||||||
|
artifacts:
|
||||||
|
- xash3d-fwgs/bin/xash3d-fwgs-debian-amd64.tar.bz2
|
||||||
|
|
||||||
29
.builds/freebsd.yml
Normal file
29
.builds/freebsd.yml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
image: freebsd/latest
|
||||||
|
packages:
|
||||||
|
- lang/python
|
||||||
|
- devel/pkgconf
|
||||||
|
- devel/sdl20
|
||||||
|
- print/freetype2
|
||||||
|
- x11-fonts/fontconfig
|
||||||
|
- audio/opus
|
||||||
|
sources:
|
||||||
|
- https://git.sr.ht/~a1batross/xash3d-fwgs
|
||||||
|
tasks:
|
||||||
|
- client: |
|
||||||
|
cd xash3d-fwgs
|
||||||
|
./waf configure --enable-tests --enable-engine-tests build install --destdir=bin
|
||||||
|
- server: |
|
||||||
|
cd xash3d-fwgs
|
||||||
|
./waf configure --reconfigure --dedicated build install --destdir=bin
|
||||||
|
- run-tests: |
|
||||||
|
cd xash3d-fwgs/bin
|
||||||
|
export SDL_VIDEODRIVER=wayland
|
||||||
|
./xash3d -runtests
|
||||||
|
./xash -runtests
|
||||||
|
rm -rf valve/gameinfo.txt test_*
|
||||||
|
- package: |
|
||||||
|
cd xash3d-fwgs/bin
|
||||||
|
tar -cjvf xash3d-fwgs-freebsd-amd64.tar.bz2 *
|
||||||
|
artifacts:
|
||||||
|
- xash3d-fwgs/bin/xash3d-fwgs-freebsd-amd64.tar.bz2
|
||||||
|
|
||||||
29
.builds/netbsd.yml
Normal file
29
.builds/netbsd.yml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
image: netbsd/latest
|
||||||
|
packages:
|
||||||
|
- python311
|
||||||
|
- SDL2
|
||||||
|
- freetype2
|
||||||
|
- fontconfig
|
||||||
|
- libopus
|
||||||
|
- pkgconf
|
||||||
|
sources:
|
||||||
|
- https://git.sr.ht/~a1batross/xash3d-fwgs
|
||||||
|
tasks:
|
||||||
|
- client: |
|
||||||
|
cd xash3d-fwgs
|
||||||
|
python3.11 waf configure --enable-tests --enable-engine-tests build install --destdir=bin
|
||||||
|
- server: |
|
||||||
|
cd xash3d-fwgs
|
||||||
|
python3.11 waf configure --reconfigure --dedicated build install --destdir=bin
|
||||||
|
- run-tests: |
|
||||||
|
cd xash3d-fwgs/bin
|
||||||
|
export SDL_VIDEODRIVER=wayland
|
||||||
|
./xash3d -runtests
|
||||||
|
./xash -runtests
|
||||||
|
rm -rf valve/gameinfo.txt test_*
|
||||||
|
- package: |
|
||||||
|
cd xash3d-fwgs/bin
|
||||||
|
tar -cjvf xash3d-fwgs-netbsd-amd64.tar.bz2 *
|
||||||
|
artifacts:
|
||||||
|
- xash3d-fwgs/bin/xash3d-fwgs-netbsd-amd64.tar.bz2
|
||||||
|
|
||||||
26
.builds/openbsd.yml
Normal file
26
.builds/openbsd.yml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
image: openbsd/latest
|
||||||
|
packages:
|
||||||
|
- python3
|
||||||
|
- sdl2
|
||||||
|
- opus
|
||||||
|
sources:
|
||||||
|
- https://git.sr.ht/~a1batross/xash3d-fwgs
|
||||||
|
tasks:
|
||||||
|
- client: |
|
||||||
|
cd xash3d-fwgs
|
||||||
|
python3 waf configure --enable-tests --enable-engine-tests build install --destdir=bin
|
||||||
|
- server: |
|
||||||
|
cd xash3d-fwgs
|
||||||
|
python3 waf configure --reconfigure --dedicated build install --destdir=bin
|
||||||
|
- run-tests: |
|
||||||
|
cd xash3d-fwgs/bin
|
||||||
|
export SDL_VIDEODRIVER=wayland
|
||||||
|
./xash3d -runtests
|
||||||
|
./xash -runtests
|
||||||
|
rm -rf valve/gameinfo.txt test_*
|
||||||
|
- package: |
|
||||||
|
cd xash3d-fwgs/bin
|
||||||
|
tar -cjvf xash3d-fwgs-openbsd-amd64.tar.bz2 *
|
||||||
|
artifacts:
|
||||||
|
- xash3d-fwgs/bin/xash3d-fwgs-openbsd-amd64.tar.bz2
|
||||||
|
|
||||||
40
.cirrus.yml
40
.cirrus.yml
@@ -1,34 +1,22 @@
|
|||||||
task:
|
|
||||||
name: freebsd-12-amd64
|
|
||||||
freebsd_instance:
|
|
||||||
image_family: freebsd-12-3
|
|
||||||
setup_script:
|
|
||||||
- pkg update
|
|
||||||
- pkg install -y git sdl2 python fontconfig
|
|
||||||
- git submodule update --init --recursive
|
|
||||||
test_script:
|
|
||||||
- ./scripts/cirrus/build_freebsd.sh dedicated
|
|
||||||
- ./scripts/cirrus/build_freebsd.sh full
|
|
||||||
|
|
||||||
task:
|
|
||||||
name: freebsd-13-amd64
|
|
||||||
freebsd_instance:
|
|
||||||
image_family: freebsd-13-1
|
|
||||||
setup_script:
|
|
||||||
- pkg update
|
|
||||||
- pkg install -y git sdl2 python fontconfig
|
|
||||||
- git submodule update --init --recursive
|
|
||||||
test_script:
|
|
||||||
- ./scripts/cirrus/build_freebsd.sh dedicated
|
|
||||||
- ./scripts/cirrus/build_freebsd.sh full
|
|
||||||
|
|
||||||
task:
|
task:
|
||||||
name: freebsd-14-amd64
|
name: freebsd-14-amd64
|
||||||
freebsd_instance:
|
freebsd_instance:
|
||||||
image_family: freebsd-14-0-snap
|
image_family: freebsd-14-0
|
||||||
setup_script:
|
setup_script:
|
||||||
- pkg update
|
- pkg update
|
||||||
- pkg install -y git sdl2 python fontconfig
|
- pkg install -y pkgconf git sdl2 python fontconfig opus
|
||||||
|
- git submodule update --init --recursive
|
||||||
|
test_script:
|
||||||
|
- ./scripts/cirrus/build_freebsd.sh dedicated
|
||||||
|
- ./scripts/cirrus/build_freebsd.sh full
|
||||||
|
|
||||||
|
task:
|
||||||
|
name: freebsd-15-amd64
|
||||||
|
freebsd_instance:
|
||||||
|
image_family: freebsd-15-0-snap
|
||||||
|
setup_script:
|
||||||
|
- pkg update
|
||||||
|
- pkg install -y pkgconf git sdl2 python fontconfig opus
|
||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
test_script:
|
test_script:
|
||||||
- ./scripts/cirrus/build_freebsd.sh dedicated
|
- ./scripts/cirrus/build_freebsd.sh dedicated
|
||||||
|
|||||||
360
.editorconfig
360
.editorconfig
@@ -1,9 +1,365 @@
|
|||||||
# EditorConfig is awesome: https://EditorConfig.org
|
# this file is just a suggestion, you might follow it, you might not
|
||||||
root = true
|
root = true
|
||||||
|
|
||||||
[*]
|
[*]
|
||||||
charset = latin1
|
charset = utf-8
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
ij_formatter_off_tag = @formatter:off
|
||||||
|
ij_formatter_on_tag = @formatter:on
|
||||||
|
|
||||||
|
[*.{c++,cc,cpp,cppm,cxx,h,h++,hh,hpp,hxx,inl,ipp,ixx,tlh,tli}]
|
||||||
|
|
||||||
|
# Visual C++ Formatting settings
|
||||||
|
cpp_indent_braces = false
|
||||||
|
cpp_indent_multi_line_relative_to = innermost_parenthesis
|
||||||
|
cpp_indent_within_parentheses = indent
|
||||||
|
cpp_indent_preserve_within_parentheses = true
|
||||||
|
cpp_indent_case_contents = true
|
||||||
|
cpp_indent_case_labels = false
|
||||||
|
cpp_indent_case_contents_when_block = false
|
||||||
|
cpp_indent_lambda_braces_when_parameter = true
|
||||||
|
cpp_indent_goto_labels = one_left
|
||||||
|
cpp_indent_preprocessor = leftmost_column
|
||||||
|
cpp_indent_access_specifiers = false
|
||||||
|
cpp_indent_namespace_contents = true
|
||||||
|
cpp_indent_preserve_comments = false
|
||||||
|
cpp_new_line_before_open_brace_namespace = new_line
|
||||||
|
cpp_new_line_before_open_brace_type = new_line
|
||||||
|
cpp_new_line_before_open_brace_function = new_line
|
||||||
|
cpp_new_line_before_open_brace_block = new_line
|
||||||
|
cpp_new_line_before_open_brace_lambda = new_line
|
||||||
|
cpp_new_line_scope_braces_on_separate_lines = true
|
||||||
|
cpp_new_line_close_brace_same_line_empty_type = false
|
||||||
|
cpp_new_line_close_brace_same_line_empty_function = false
|
||||||
|
cpp_new_line_before_catch = true
|
||||||
|
cpp_new_line_before_else = true
|
||||||
|
cpp_new_line_before_while_in_do_while = false
|
||||||
|
cpp_space_before_function_open_parenthesis = remove
|
||||||
|
cpp_space_within_parameter_list_parentheses = true
|
||||||
|
cpp_space_between_empty_parameter_list_parentheses = true
|
||||||
|
cpp_space_after_keywords_in_control_flow_statements = false
|
||||||
|
cpp_space_within_control_flow_statement_parentheses = true
|
||||||
|
cpp_space_before_lambda_open_parenthesis = false
|
||||||
|
cpp_space_within_cast_parentheses = false
|
||||||
|
cpp_space_after_cast_close_parenthesis = false
|
||||||
|
cpp_space_within_expression_parentheses = true
|
||||||
|
cpp_space_before_block_open_brace = true
|
||||||
|
cpp_space_between_empty_braces = true
|
||||||
|
cpp_space_before_initializer_list_open_brace = false
|
||||||
|
cpp_space_within_initializer_list_braces = true
|
||||||
|
cpp_space_preserve_in_initializer_list = true
|
||||||
|
cpp_space_before_open_square_bracket = false
|
||||||
|
cpp_space_within_square_brackets = false
|
||||||
|
cpp_space_before_empty_square_brackets = false
|
||||||
|
cpp_space_between_empty_square_brackets = false
|
||||||
|
cpp_space_group_square_brackets = true
|
||||||
|
cpp_space_within_lambda_brackets = false
|
||||||
|
cpp_space_between_empty_lambda_brackets = false
|
||||||
|
cpp_space_before_comma = false
|
||||||
|
cpp_space_after_comma = true
|
||||||
|
cpp_space_remove_around_member_operators = true
|
||||||
|
cpp_space_before_inheritance_colon = true
|
||||||
|
cpp_space_before_constructor_colon = true
|
||||||
|
cpp_space_remove_before_semicolon = true
|
||||||
|
cpp_space_after_semicolon = true
|
||||||
|
cpp_space_remove_around_unary_operator = true
|
||||||
|
cpp_space_around_binary_operator = insert
|
||||||
|
cpp_space_around_assignment_operator = insert
|
||||||
|
cpp_space_pointer_reference_alignment = right
|
||||||
|
cpp_space_around_ternary_operator = insert
|
||||||
|
cpp_use_unreal_engine_macro_formatting = true
|
||||||
|
cpp_wrap_preserve_blocks = one_liners
|
||||||
|
|
||||||
|
# IDEA settings
|
||||||
|
ij_c_add_brief_tag = false
|
||||||
|
ij_c_add_getter_prefix = true
|
||||||
|
ij_c_add_setter_prefix = true
|
||||||
|
ij_c_align_dictionary_pair_values = false
|
||||||
|
ij_c_align_group_field_declarations = false
|
||||||
|
ij_c_align_init_list_in_columns = true
|
||||||
|
ij_c_align_multiline_array_initializer_expression = false
|
||||||
|
ij_c_align_multiline_assignment = false
|
||||||
|
ij_c_align_multiline_binary_operation = false
|
||||||
|
ij_c_align_multiline_chained_methods = false
|
||||||
|
ij_c_align_multiline_for = true
|
||||||
|
ij_c_align_multiline_ternary_operation = false
|
||||||
|
ij_c_array_initializer_comma_on_next_line = false
|
||||||
|
ij_c_array_initializer_new_line_after_left_brace = false
|
||||||
|
ij_c_array_initializer_right_brace_on_new_line = false
|
||||||
|
ij_c_array_initializer_wrap = off
|
||||||
|
ij_c_assignment_wrap = off
|
||||||
|
ij_c_binary_operation_sign_on_next_line = false
|
||||||
|
ij_c_binary_operation_wrap = off
|
||||||
|
ij_c_blank_lines_after_class_header = 0
|
||||||
|
ij_c_blank_lines_after_imports = 1
|
||||||
|
ij_c_blank_lines_around_class = 1
|
||||||
|
ij_c_blank_lines_around_field = 0
|
||||||
|
ij_c_blank_lines_around_field_in_interface = 0
|
||||||
|
ij_c_blank_lines_around_method = 1
|
||||||
|
ij_c_blank_lines_around_method_in_interface = 1
|
||||||
|
ij_c_blank_lines_around_namespace = 0
|
||||||
|
ij_c_blank_lines_around_properties_in_declaration = 0
|
||||||
|
ij_c_blank_lines_around_properties_in_interface = 0
|
||||||
|
ij_c_blank_lines_before_imports = 1
|
||||||
|
ij_c_blank_lines_before_method_body = 0
|
||||||
|
ij_c_block_brace_placement = next_line
|
||||||
|
ij_c_block_brace_style = next_line
|
||||||
|
ij_c_block_comment_at_first_column = true
|
||||||
|
ij_c_catch_on_new_line = false
|
||||||
|
ij_c_class_brace_style = next_line
|
||||||
|
ij_c_class_constructor_init_list_align_multiline = true
|
||||||
|
ij_c_class_constructor_init_list_comma_on_next_line = false
|
||||||
|
ij_c_class_constructor_init_list_new_line_after_colon = never
|
||||||
|
ij_c_class_constructor_init_list_new_line_before_colon = if_long
|
||||||
|
ij_c_class_constructor_init_list_wrap = normal
|
||||||
|
ij_c_copy_is_deep = false
|
||||||
|
ij_c_create_interface_for_categories = true
|
||||||
|
ij_c_declare_generated_methods = true
|
||||||
|
ij_c_description_include_member_names = true
|
||||||
|
ij_c_discharged_short_ternary_operator = false
|
||||||
|
ij_c_do_not_add_breaks = false
|
||||||
|
ij_c_do_while_brace_force = never
|
||||||
|
ij_c_else_on_new_line = false
|
||||||
|
ij_c_enum_constants_comma_on_next_line = false
|
||||||
|
ij_c_enum_constants_wrap = off
|
||||||
|
ij_c_for_brace_force = never
|
||||||
|
ij_c_for_statement_new_line_after_left_paren = false
|
||||||
|
ij_c_for_statement_right_paren_on_new_line = false
|
||||||
|
ij_c_for_statement_wrap = off
|
||||||
|
ij_c_function_brace_placement = next_line
|
||||||
|
ij_c_function_call_arguments_align_multiline = true
|
||||||
|
ij_c_function_call_arguments_align_multiline_pars = false
|
||||||
|
ij_c_function_call_arguments_comma_on_next_line = false
|
||||||
|
ij_c_function_call_arguments_new_line_after_lpar = false
|
||||||
|
ij_c_function_call_arguments_new_line_before_rpar = false
|
||||||
|
ij_c_function_call_arguments_wrap = normal
|
||||||
|
ij_c_function_non_top_after_return_type_wrap = normal
|
||||||
|
ij_c_function_parameters_align_multiline = true
|
||||||
|
ij_c_function_parameters_align_multiline_pars = false
|
||||||
|
ij_c_function_parameters_comma_on_next_line = false
|
||||||
|
ij_c_function_parameters_new_line_after_lpar = false
|
||||||
|
ij_c_function_parameters_new_line_before_rpar = false
|
||||||
|
ij_c_function_parameters_wrap = normal
|
||||||
|
ij_c_function_top_after_return_type_wrap = normal
|
||||||
|
ij_c_generate_additional_eq_operators = true
|
||||||
|
ij_c_generate_additional_rel_operators = true
|
||||||
|
ij_c_generate_class_constructor = true
|
||||||
|
ij_c_generate_comparison_operators_use_std_tie = false
|
||||||
|
ij_c_generate_instance_variables_for_properties = ask
|
||||||
|
ij_c_generate_operators_as_members = true
|
||||||
|
ij_c_header_guard_style_pattern = ${PROJECT_NAME}_${FILE_NAME}_${EXT}
|
||||||
|
ij_c_if_brace_force = never
|
||||||
|
ij_c_in_line_short_ternary_operator = true
|
||||||
|
ij_c_indent_block_comment = true
|
||||||
|
ij_c_indent_c_struct_members = 4
|
||||||
|
ij_c_indent_case_from_switch = true
|
||||||
|
ij_c_indent_class_members = 4
|
||||||
|
ij_c_indent_directive_as_code = false
|
||||||
|
ij_c_indent_implementation_members = 0
|
||||||
|
ij_c_indent_inside_code_block = 4
|
||||||
|
ij_c_indent_interface_members = 0
|
||||||
|
ij_c_indent_interface_members_except_ivars_block = false
|
||||||
|
ij_c_indent_namespace_members = 4
|
||||||
|
ij_c_indent_preprocessor_directive = 0
|
||||||
|
ij_c_indent_visibility_keywords = 0
|
||||||
|
ij_c_insert_override = true
|
||||||
|
ij_c_insert_virtual_with_override = false
|
||||||
|
ij_c_introduce_auto_consts = false
|
||||||
|
ij_c_introduce_auto_vars = false
|
||||||
|
ij_c_introduce_const_params = false
|
||||||
|
ij_c_introduce_const_vars = false
|
||||||
|
ij_c_introduce_constexpr_consts = false
|
||||||
|
ij_c_introduce_generate_property = false
|
||||||
|
ij_c_introduce_generate_synthesize = true
|
||||||
|
ij_c_introduce_globals_to_header = true
|
||||||
|
ij_c_introduce_prop_to_private_category = false
|
||||||
|
ij_c_introduce_static_consts = true
|
||||||
|
ij_c_introduce_use_ns_types = false
|
||||||
|
ij_c_ivars_prefix = _
|
||||||
|
ij_c_ivars_suffix =
|
||||||
|
ij_c_keep_blank_lines_before_end = 2
|
||||||
|
ij_c_keep_blank_lines_before_right_brace = 2
|
||||||
|
ij_c_keep_blank_lines_in_code = 2
|
||||||
|
ij_c_keep_blank_lines_in_declarations = 2
|
||||||
|
ij_c_keep_case_expressions_in_one_line = false
|
||||||
|
ij_c_keep_control_statement_in_one_line = false
|
||||||
|
ij_c_keep_directive_at_first_column = true
|
||||||
|
ij_c_keep_first_column_comment = false
|
||||||
|
ij_c_keep_line_breaks = true
|
||||||
|
ij_c_keep_nested_namespaces_in_one_line = false
|
||||||
|
ij_c_keep_simple_blocks_in_one_line = false
|
||||||
|
ij_c_keep_simple_methods_in_one_line = false
|
||||||
|
ij_c_keep_structures_in_one_line = false
|
||||||
|
ij_c_lambda_capture_list_align_multiline = false
|
||||||
|
ij_c_lambda_capture_list_align_multiline_bracket = false
|
||||||
|
ij_c_lambda_capture_list_comma_on_next_line = false
|
||||||
|
ij_c_lambda_capture_list_new_line_after_lbracket = false
|
||||||
|
ij_c_lambda_capture_list_new_line_before_rbracket = false
|
||||||
|
ij_c_lambda_capture_list_wrap = off
|
||||||
|
ij_c_line_comment_add_space = false
|
||||||
|
ij_c_line_comment_at_first_column = true
|
||||||
|
ij_c_method_brace_placement = end_of_line
|
||||||
|
ij_c_method_call_arguments_align_by_colons = true
|
||||||
|
ij_c_method_call_arguments_align_multiline = false
|
||||||
|
ij_c_method_call_arguments_special_dictionary_pairs_treatment = true
|
||||||
|
ij_c_method_call_arguments_wrap = off
|
||||||
|
ij_c_method_call_chain_wrap = off
|
||||||
|
ij_c_method_parameters_align_by_colons = true
|
||||||
|
ij_c_method_parameters_align_multiline = false
|
||||||
|
ij_c_method_parameters_wrap = off
|
||||||
|
ij_c_namespace_brace_placement = next_line
|
||||||
|
ij_c_parentheses_expression_new_line_after_left_paren = false
|
||||||
|
ij_c_parentheses_expression_right_paren_on_new_line = false
|
||||||
|
ij_c_place_assignment_sign_on_next_line = false
|
||||||
|
ij_c_property_nonatomic = true
|
||||||
|
ij_c_put_ivars_to_implementation = true
|
||||||
|
ij_c_refactor_compatibility_aliases_and_classes = true
|
||||||
|
ij_c_refactor_properties_and_ivars = true
|
||||||
|
ij_c_release_style = ivar
|
||||||
|
ij_c_retain_object_parameters_in_constructor = true
|
||||||
|
ij_c_semicolon_after_method_signature = false
|
||||||
|
ij_c_shift_operation_align_multiline = true
|
||||||
|
ij_c_shift_operation_wrap = normal
|
||||||
|
ij_c_show_non_virtual_functions = false
|
||||||
|
ij_c_space_after_colon = true
|
||||||
|
ij_c_space_after_colon_in_foreach = true
|
||||||
|
ij_c_space_after_colon_in_selector = false
|
||||||
|
ij_c_space_after_comma = true
|
||||||
|
ij_c_space_after_cup_in_blocks = false
|
||||||
|
ij_c_space_after_dictionary_literal_colon = true
|
||||||
|
ij_c_space_after_for_semicolon = true
|
||||||
|
ij_c_space_after_init_list_colon = true
|
||||||
|
ij_c_space_after_method_parameter_type_parentheses = false
|
||||||
|
ij_c_space_after_method_return_type_parentheses = false
|
||||||
|
ij_c_space_after_pointer_in_declaration = false
|
||||||
|
ij_c_space_after_quest = true
|
||||||
|
ij_c_space_after_reference_in_declaration = false
|
||||||
|
ij_c_space_after_reference_in_rvalue = false
|
||||||
|
ij_c_space_after_structures_rbrace = true
|
||||||
|
ij_c_space_after_superclass_colon = true
|
||||||
|
ij_c_space_after_type_cast = false
|
||||||
|
ij_c_space_after_visibility_sign_in_method_declaration = true
|
||||||
|
ij_c_space_before_autorelease_pool_lbrace = true
|
||||||
|
ij_c_space_before_catch_keyword = true
|
||||||
|
ij_c_space_before_catch_left_brace = true
|
||||||
|
ij_c_space_before_catch_parentheses = false
|
||||||
|
ij_c_space_before_category_parentheses = true
|
||||||
|
ij_c_space_before_chained_send_message = true
|
||||||
|
ij_c_space_before_class_left_brace = true
|
||||||
|
ij_c_space_before_colon = true
|
||||||
|
ij_c_space_before_colon_in_foreach = true
|
||||||
|
ij_c_space_before_comma = false
|
||||||
|
ij_c_space_before_dictionary_literal_colon = true
|
||||||
|
ij_c_space_before_do_left_brace = true
|
||||||
|
ij_c_space_before_else_keyword = true
|
||||||
|
ij_c_space_before_else_left_brace = true
|
||||||
|
ij_c_space_before_export_lbrace = true
|
||||||
|
ij_c_space_before_for_left_brace = true
|
||||||
|
ij_c_space_before_for_parentheses = false
|
||||||
|
ij_c_space_before_for_semicolon = false
|
||||||
|
ij_c_space_before_if_left_brace = true
|
||||||
|
ij_c_space_before_if_parentheses = false
|
||||||
|
ij_c_space_before_init_list = false
|
||||||
|
ij_c_space_before_init_list_colon = true
|
||||||
|
ij_c_space_before_method_call_parentheses = false
|
||||||
|
ij_c_space_before_method_left_brace = true
|
||||||
|
ij_c_space_before_method_parentheses = false
|
||||||
|
ij_c_space_before_namespace_lbrace = true
|
||||||
|
ij_c_space_before_pointer_in_declaration = true
|
||||||
|
ij_c_space_before_property_attributes_parentheses = false
|
||||||
|
ij_c_space_before_protocols_brackets = true
|
||||||
|
ij_c_space_before_quest = true
|
||||||
|
ij_c_space_before_reference_in_declaration = true
|
||||||
|
ij_c_space_before_superclass_colon = true
|
||||||
|
ij_c_space_before_switch_left_brace = true
|
||||||
|
ij_c_space_before_switch_parentheses = false
|
||||||
|
ij_c_space_before_template_call_lt = false
|
||||||
|
ij_c_space_before_template_declaration_lt = true
|
||||||
|
ij_c_space_before_try_left_brace = true
|
||||||
|
ij_c_space_before_while_keyword = true
|
||||||
|
ij_c_space_before_while_left_brace = true
|
||||||
|
ij_c_space_before_while_parentheses = false
|
||||||
|
ij_c_space_between_adjacent_brackets = false
|
||||||
|
ij_c_space_between_operator_and_punctuator = false
|
||||||
|
ij_c_space_within_empty_array_initializer_braces = true
|
||||||
|
ij_c_spaces_around_additive_operators = true
|
||||||
|
ij_c_spaces_around_assignment_operators = true
|
||||||
|
ij_c_spaces_around_bitwise_operators = true
|
||||||
|
ij_c_spaces_around_equality_operators = true
|
||||||
|
ij_c_spaces_around_lambda_arrow = true
|
||||||
|
ij_c_spaces_around_logical_operators = true
|
||||||
|
ij_c_spaces_around_multiplicative_operators = true
|
||||||
|
ij_c_spaces_around_pm_operators = false
|
||||||
|
ij_c_spaces_around_relational_operators = true
|
||||||
|
ij_c_spaces_around_shift_operators = true
|
||||||
|
ij_c_spaces_around_unary_operator = false
|
||||||
|
ij_c_spaces_within_array_initializer_braces = true
|
||||||
|
ij_c_spaces_within_braces = false
|
||||||
|
ij_c_spaces_within_brackets = false
|
||||||
|
ij_c_spaces_within_cast_parentheses = false
|
||||||
|
ij_c_spaces_within_catch_parentheses = true
|
||||||
|
ij_c_spaces_within_category_parentheses = false
|
||||||
|
ij_c_spaces_within_empty_braces = false
|
||||||
|
ij_c_spaces_within_empty_function_call_parentheses = true
|
||||||
|
ij_c_spaces_within_empty_function_declaration_parentheses = true
|
||||||
|
ij_c_spaces_within_empty_lambda_capture_list_bracket = false
|
||||||
|
ij_c_spaces_within_empty_template_call_ltgt = false
|
||||||
|
ij_c_spaces_within_empty_template_declaration_ltgt = false
|
||||||
|
ij_c_spaces_within_for_parentheses = true
|
||||||
|
ij_c_spaces_within_function_call_parentheses = true
|
||||||
|
ij_c_spaces_within_function_declaration_parentheses = true
|
||||||
|
ij_c_spaces_within_if_parentheses = true
|
||||||
|
ij_c_spaces_within_lambda_capture_list_bracket = false
|
||||||
|
ij_c_spaces_within_method_parameter_type_parentheses = false
|
||||||
|
ij_c_spaces_within_method_return_type_parentheses = false
|
||||||
|
ij_c_spaces_within_parentheses = true
|
||||||
|
ij_c_spaces_within_property_attributes_parentheses = false
|
||||||
|
ij_c_spaces_within_protocols_brackets = false
|
||||||
|
ij_c_spaces_within_send_message_brackets = false
|
||||||
|
ij_c_spaces_within_structured_binding_list_bracket = false
|
||||||
|
ij_c_spaces_within_switch_parentheses = true
|
||||||
|
ij_c_spaces_within_template_call_ltgt = false
|
||||||
|
ij_c_spaces_within_template_declaration_ltgt = false
|
||||||
|
ij_c_spaces_within_template_double_gt = false
|
||||||
|
ij_c_spaces_within_while_parentheses = true
|
||||||
|
ij_c_special_else_if_treatment = true
|
||||||
|
ij_c_structured_binding_list_align_multiline = false
|
||||||
|
ij_c_structured_binding_list_align_multiline_bracket = false
|
||||||
|
ij_c_structured_binding_list_comma_on_next_line = false
|
||||||
|
ij_c_structured_binding_list_new_line_after_lbracket = false
|
||||||
|
ij_c_structured_binding_list_new_line_before_rbracket = false
|
||||||
|
ij_c_structured_binding_list_wrap = off
|
||||||
|
ij_c_superclass_list_after_colon = never
|
||||||
|
ij_c_superclass_list_align_multiline = true
|
||||||
|
ij_c_superclass_list_before_colon = if_long
|
||||||
|
ij_c_superclass_list_comma_on_next_line = false
|
||||||
|
ij_c_superclass_list_wrap = on_every_item
|
||||||
|
ij_c_tag_prefix_of_block_comment = at
|
||||||
|
ij_c_tag_prefix_of_line_comment = back_slash
|
||||||
|
ij_c_template_call_arguments_align_multiline = false
|
||||||
|
ij_c_template_call_arguments_align_multiline_pars = false
|
||||||
|
ij_c_template_call_arguments_comma_on_next_line = false
|
||||||
|
ij_c_template_call_arguments_new_line_after_lt = false
|
||||||
|
ij_c_template_call_arguments_new_line_before_gt = false
|
||||||
|
ij_c_template_call_arguments_wrap = off
|
||||||
|
ij_c_template_declaration_function_body_indent = false
|
||||||
|
ij_c_template_declaration_function_wrap = split_into_lines
|
||||||
|
ij_c_template_declaration_struct_body_indent = false
|
||||||
|
ij_c_template_declaration_struct_wrap = split_into_lines
|
||||||
|
ij_c_template_parameters_align_multiline = false
|
||||||
|
ij_c_template_parameters_align_multiline_pars = false
|
||||||
|
ij_c_template_parameters_comma_on_next_line = false
|
||||||
|
ij_c_template_parameters_new_line_after_lt = false
|
||||||
|
ij_c_template_parameters_new_line_before_gt = false
|
||||||
|
ij_c_template_parameters_wrap = off
|
||||||
|
ij_c_ternary_operation_signs_on_next_line = false
|
||||||
|
ij_c_ternary_operation_wrap = off
|
||||||
|
ij_c_type_qualifiers_placement = before
|
||||||
|
ij_c_use_modern_casts = true
|
||||||
|
ij_c_use_setters_in_constructor = true
|
||||||
|
ij_c_while_brace_force = never
|
||||||
|
ij_c_while_on_new_line = false
|
||||||
|
ij_c_wrap_property_declaration = off
|
||||||
|
|||||||
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
custom: https://github.com/FWGS/xash3d-fwgs/blob/master/Documentation/donate.md
|
||||||
110
.github/workflows/c-cpp.yml
vendored
110
.github/workflows/c-cpp.yml
vendored
@@ -13,60 +13,112 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-18.04
|
# Linux build specifically want oldest Ubuntu as possible
|
||||||
|
# to be crossdistribution compatible, otherwise use ubuntu-latest
|
||||||
|
- os: ubuntu-20.04
|
||||||
targetos: linux
|
targetos: linux
|
||||||
targetarch: amd64
|
targetarch: amd64
|
||||||
- os: ubuntu-18.04
|
- os: ubuntu-20.04
|
||||||
targetos: linux
|
targetos: linux
|
||||||
targetarch: i386
|
targetarch: i386
|
||||||
# - os: ubuntu-aarch64-20.04
|
# - os: ubuntu-aarch64-20.04
|
||||||
# targetos: linux
|
# targetos: linux
|
||||||
# targetarch: aarch64
|
# targetarch: aarch64
|
||||||
|
- os: ubuntu-20.04
|
||||||
- os: ubuntu-18.04
|
|
||||||
targetos: android
|
targetos: android
|
||||||
targetarch: 32
|
targetarch: multiarch
|
||||||
- os: ubuntu-18.04
|
# - os: ubuntu-20.04
|
||||||
targetos: android
|
# targetos: motomagx
|
||||||
targetarch: 64
|
# targetarch: armv6
|
||||||
|
|
||||||
- os: ubuntu-18.04
|
|
||||||
targetos: motomagx
|
|
||||||
targetarch: armv6
|
|
||||||
|
|
||||||
|
- os: ubuntu-latest
|
||||||
|
targetos: nswitch
|
||||||
|
targetarch: arm64
|
||||||
|
- os: ubuntu-latest
|
||||||
|
targetos: psvita
|
||||||
|
targetarch: armv7hf
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
targetos: win32
|
targetos: win32
|
||||||
targetarch: amd64
|
targetarch: amd64
|
||||||
- os: windows-latest
|
- os: windows-2019 # always use the oldest possible for 32-bit because of older compilers, and better support of certain legacy OSes
|
||||||
targetos: win32
|
targetos: win32
|
||||||
targetarch: i386
|
targetarch: i386
|
||||||
|
- os: macos-14 # in GitHub documentation, it's an ARM64 machine
|
||||||
|
targetos: apple
|
||||||
|
targetarch: arm64
|
||||||
|
- os: macos-12 # in GitHub documentation, it's an x86 machine
|
||||||
|
targetos: apple
|
||||||
|
targetarch: amd64
|
||||||
env:
|
env:
|
||||||
SDL_VERSION: 2.0.14
|
SDL_VERSION: 2.30.3
|
||||||
GH_CPU_ARCH: ${{ matrix.targetarch }}
|
GH_CPU_ARCH: ${{ matrix.targetarch }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
ANDROID_SDK_TOOLS_VER: 4333796
|
|
||||||
UPLOADTOOL_ISPRERELEASE: true
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Checkout xash-extras
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: FWGS/xash-extras
|
|
||||||
path: xash-extras
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: bash scripts/gha/deps_${{ matrix.targetos }}.sh
|
run: bash scripts/gha/deps_${{ matrix.targetos }}.sh
|
||||||
|
|
||||||
- name: Build engine
|
- name: Build engine
|
||||||
|
env:
|
||||||
|
FWGS_PFX_PASSWORD: ${{ secrets.FWGS_PFX_PASSWORD }}
|
||||||
run: bash scripts/gha/build_${{ matrix.targetos }}.sh
|
run: bash scripts/gha/build_${{ matrix.targetos }}.sh
|
||||||
|
|
||||||
- name: Upload engine (prereleases)
|
|
||||||
run: bash scripts/continious_upload.sh artifacts/*
|
|
||||||
- name: Upload engine (artifacts)
|
- name: Upload engine (artifacts)
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: artifact-${{ matrix.targetos }}-${{ matrix.targetarch }}
|
name: artifact-${{ matrix.targetos }}-${{ matrix.targetarch }}
|
||||||
path: artifacts/*
|
path: artifacts/*
|
||||||
|
flatpak:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- app: su.xash.Engine.Compat.i386
|
||||||
|
container:
|
||||||
|
image: bilelmoussaoui/flatpak-github-actions:freedesktop-23.08
|
||||||
|
options: --privileged
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Build flatpak (Compat.i386)
|
||||||
|
uses: FWGS/flatpak-github-actions/flatpak-builder@v6.3
|
||||||
|
with:
|
||||||
|
bundle: ${{ matrix.app }}.flatpak
|
||||||
|
manifest-path: scripts/flatpak/${{ matrix.app }}.yml
|
||||||
|
release:
|
||||||
|
name: "Upload releases"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [build, flatpak]
|
||||||
|
if: ${{ github.event_name == 'push' }}
|
||||||
|
steps:
|
||||||
|
- name: Remove old release, fetch artifacts, repackage binaries and upload new release
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
RELEASE_TAG: ${{ github.ref_name == 'master' && 'continuous' || format('continuous-{0}', github.ref_name) }}
|
||||||
|
run: |
|
||||||
|
gh release delete "$RELEASE_TAG" \
|
||||||
|
--yes \
|
||||||
|
--cleanup-tag \
|
||||||
|
--repo "$GITHUB_REPOSITORY" || true
|
||||||
|
sleep 20s
|
||||||
|
gh run download "$GITHUB_RUN_ID" \
|
||||||
|
--dir artifacts/ \
|
||||||
|
--repo "$GITHUB_REPOSITORY"
|
||||||
|
pushd artifacts/
|
||||||
|
echo "Found artifacts:"
|
||||||
|
ls
|
||||||
|
for i in $(find -mindepth 1 -maxdepth 1 -type d); do
|
||||||
|
mv "$i"/* .
|
||||||
|
rm -rf "$i"
|
||||||
|
done
|
||||||
|
echo "Repackaged artifacts:"
|
||||||
|
ls -R
|
||||||
|
popd
|
||||||
|
sleep 20s
|
||||||
|
gh release create "$RELEASE_TAG" artifacts/* \
|
||||||
|
--title "Xash3D FWGS Continuous ${{ github.ref_name }} Build" \
|
||||||
|
--target $GITHUB_SHA \
|
||||||
|
--repo "$GITHUB_REPOSITORY" \
|
||||||
|
--prerelease
|
||||||
|
|||||||
9
.gitignore
vendored
9
.gitignore
vendored
@@ -54,12 +54,18 @@ CMakeFiles
|
|||||||
Makefile
|
Makefile
|
||||||
cmake_install.cmake
|
cmake_install.cmake
|
||||||
install_manifest.txt
|
install_manifest.txt
|
||||||
|
CMakeLists.txt*
|
||||||
|
CMakeScripts
|
||||||
|
Testing
|
||||||
|
compile_commands.json
|
||||||
|
_deps
|
||||||
# makedepend
|
# makedepend
|
||||||
Makefile.dep
|
Makefile.dep
|
||||||
*.bak
|
*.bak
|
||||||
ALL_BUILD.*
|
ALL_BUILD.*
|
||||||
INSTALL.*
|
INSTALL.*
|
||||||
ZERO_CHECK.*
|
ZERO_CHECK.*
|
||||||
|
CMakeLists.txt
|
||||||
|
|
||||||
# Visual Studio
|
# Visual Studio
|
||||||
*.obj
|
*.obj
|
||||||
@@ -333,3 +339,6 @@ __pycache__
|
|||||||
.history/*
|
.history/*
|
||||||
.cache/*
|
.cache/*
|
||||||
enc_temp_folder/
|
enc_temp_folder/
|
||||||
|
|
||||||
|
# KDevelop4
|
||||||
|
*.kdev4
|
||||||
|
|||||||
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -16,3 +16,9 @@
|
|||||||
[submodule "opus"]
|
[submodule "opus"]
|
||||||
path = 3rdparty/opus/opus
|
path = 3rdparty/opus/opus
|
||||||
url = https://github.com/xiph/opus
|
url = https://github.com/xiph/opus
|
||||||
|
[submodule "3rdparty/xash-extras"]
|
||||||
|
path = 3rdparty/extras/xash-extras
|
||||||
|
url = https://github.com/FWGS/xash-extras
|
||||||
|
[submodule "3rdparty/bzip2/bzip2"]
|
||||||
|
path = 3rdparty/bzip2/bzip2
|
||||||
|
url = https://gitlab.com/bzip2/bzip2
|
||||||
|
|||||||
21
3rdparty/MultiEmulator/LICENSE
vendored
Normal file
21
3rdparty/MultiEmulator/LICENSE
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2017-2018 Alexander Belkin
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
25
3rdparty/MultiEmulator/README.md
vendored
Normal file
25
3rdparty/MultiEmulator/README.md
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# MultiEmulator
|
||||||
|
|
||||||
|
**MultiEmulator** - project for GoldSource Engine, which provides ability to generate tickets with a specific SteamID key, using all available emulators for this engine.
|
||||||
|
|
||||||
|
Ticket is processed by the game server of Half-Life 1 and modifications using **DProto** or **ReUnion** modules. If the server does not have these modules, then MultiEmulator won't work.
|
||||||
|
|
||||||
|
# Ticket generators
|
||||||
|
|
||||||
|
Currently available ticket generators:
|
||||||
|
* OldRevEmu
|
||||||
|
* AVSMP
|
||||||
|
* Setti
|
||||||
|
* SteamEmu
|
||||||
|
* RevEmu
|
||||||
|
* SC2009
|
||||||
|
* RevEmu2013
|
||||||
|
|
||||||
|
Currently under development generators:
|
||||||
|
* SmartSteamEmu (SSE3)
|
||||||
|
|
||||||
|
# How to use?
|
||||||
|
Each file in the **MultiEmulator\Source\Emulators** folder contains a **Generate** function that writes a ticket to the **pDest** argument for the emulator of the same name as a header file. As a result of the function, the size of the written ticket is returned. If the generator can set an arbitrary SteamID, the function will have the **nSteamID** argument, in which the required SteamID is specified.
|
||||||
|
|
||||||
|
# Examples
|
||||||
|
As an example, the DLL was developed that searches InitiateGameConnection method in ISteamUser interface, which generates Steam ticket, and inserts in its place own generator, which creates RevEmu2013 ticket with SteamID equal to 3333333. You can find this project in **Example** folder, you just need to compile it and perform DLL injection in hl.exe process with any known injection method.
|
||||||
37
3rdparty/MultiEmulator/include/multi_emulator.h
vendored
Normal file
37
3rdparty/MultiEmulator/include/multi_emulator.h
vendored
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#ifndef MULTI_EMULATOR_H
|
||||||
|
#define MULTI_EMULATOR_H
|
||||||
|
|
||||||
|
#if defined( __GNUC__ )
|
||||||
|
#if defined( __i386__ )
|
||||||
|
#define ME_EXPORT __attribute__(( visibility( "default" ), force_align_arg_pointer ))
|
||||||
|
#else
|
||||||
|
#define ME_EXPORT __attribute__(( visibility ( "default" )))
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#if defined( _MSC_VER )
|
||||||
|
#define ME_EXPORT __declspec( dllexport )
|
||||||
|
#else
|
||||||
|
#define ME_EXPORT
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#if __cplusplus
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int ME_EXPORT GenerateRevEmu2013( void *pDest, int nSteamID );
|
||||||
|
int ME_EXPORT GenerateSC2009( void *pDest, int nSteamID );
|
||||||
|
int ME_EXPORT GenerateOldRevEmu( void *pDest, int nSteamID );
|
||||||
|
int ME_EXPORT GenerateSteamEmu( void *pDest, int nSteamID );
|
||||||
|
int ME_EXPORT GenerateRevEmu( void *pDest, int nSteamID );
|
||||||
|
int ME_EXPORT GenerateSetti( void *pDest );
|
||||||
|
int ME_EXPORT GenerateAVSMP( void *pDest, int nSteamID, int bUniverse );
|
||||||
|
|
||||||
|
#if __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // MULTI_EMULATOR_H
|
||||||
13
3rdparty/MultiEmulator/src/AVSMP.cpp
vendored
Normal file
13
3rdparty/MultiEmulator/src/AVSMP.cpp
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#include "multi_emulator.h"
|
||||||
|
|
||||||
|
/* bUniverse param is "y" value in "STEAM_x:y:z" */
|
||||||
|
int GenerateAVSMP(void *pDest, int nSteamID, int bUniverse)
|
||||||
|
{
|
||||||
|
auto pTicket = (int *)pDest;
|
||||||
|
|
||||||
|
pTicket[0] = 0x14; // +0, header
|
||||||
|
pTicket[3] = (nSteamID << 1) | (bUniverse ? 1 : 0); // +12, SteamId, Low part
|
||||||
|
pTicket[4] = 0x01100001; // +16, SteamId, High part
|
||||||
|
|
||||||
|
return 28;
|
||||||
|
}
|
||||||
1376
3rdparty/MultiEmulator/src/CRijndael.cpp
vendored
Normal file
1376
3rdparty/MultiEmulator/src/CRijndael.cpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
187
3rdparty/MultiEmulator/src/CRijndael.h
vendored
Normal file
187
3rdparty/MultiEmulator/src/CRijndael.h
vendored
Normal file
@@ -0,0 +1,187 @@
|
|||||||
|
#ifndef __RIJNDAEL_H__
|
||||||
|
#define __RIJNDAEL_H__
|
||||||
|
|
||||||
|
#include <exception>
|
||||||
|
#include <stdexcept>
|
||||||
|
#include <cstring>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
//Rijndael (pronounced Reindaal) is a block cipher, designed by Joan Daemen and Vincent Rijmen as a candidate algorithm for the AES.
|
||||||
|
//The cipher has a variable block length and key length. The authors currently specify how to use keys with a length
|
||||||
|
//of 128, 192, or 256 bits to encrypt blocks with al length of 128, 192 or 256 bits (all nine combinations of
|
||||||
|
//key length and block length are possible). Both block length and key length can be extended very easily to
|
||||||
|
// multiples of 32 bits.
|
||||||
|
//Rijndael can be implemented very efficiently on a wide range of processors and in hardware.
|
||||||
|
//This implementation is based on the Java Implementation used with the Cryptix toolkit found at:
|
||||||
|
//http://www.esat.kuleuven.ac.be/~rijmen/rijndael/rijndael.zip
|
||||||
|
//Java code authors: Raif S. Naffah, Paulo S. L. M. Barreto
|
||||||
|
//This Implementation was tested against KAT test published by the authors of the method and the
|
||||||
|
//results were identical.
|
||||||
|
class CRijndael
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
//Operation Modes
|
||||||
|
//The Electronic Code Book (ECB), Cipher Block Chaining (CBC) and Cipher Feedback Block (CFB) modes
|
||||||
|
//are implemented.
|
||||||
|
//In ECB mode if the same block is encrypted twice with the same key, the resulting
|
||||||
|
//ciphertext blocks are the same.
|
||||||
|
//In CBC Mode a ciphertext block is obtained by first xoring the
|
||||||
|
//plaintext block with the previous ciphertext block, and encrypting the resulting value.
|
||||||
|
//In CFB mode a ciphertext block is obtained by encrypting the previous ciphertext block
|
||||||
|
//and xoring the resulting value with the plaintext.
|
||||||
|
enum { ECB = 0, CBC = 1, CFB = 2 };
|
||||||
|
|
||||||
|
private:
|
||||||
|
enum { DEFAULT_BLOCK_SIZE = 16 };
|
||||||
|
enum { MAX_BLOCK_SIZE = 32, MAX_ROUNDS = 14, MAX_KC = 8, MAX_BC = 8 };
|
||||||
|
|
||||||
|
//Auxiliary Functions
|
||||||
|
//Multiply two elements of GF(2^m)
|
||||||
|
static int Mul(int a, int b)
|
||||||
|
{
|
||||||
|
return (a != 0 && b != 0) ? sm_alog[(sm_log[a & 0xFF] + sm_log[b & 0xFF]) % 255] : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Convenience method used in generating Transposition Boxes
|
||||||
|
static int Mul4(int a, char b[])
|
||||||
|
{
|
||||||
|
if (a == 0)
|
||||||
|
return 0;
|
||||||
|
a = sm_log[a & 0xFF];
|
||||||
|
int a0 = (b[0] != 0) ? sm_alog[(a + sm_log[b[0] & 0xFF]) % 255] & 0xFF : 0;
|
||||||
|
int a1 = (b[1] != 0) ? sm_alog[(a + sm_log[b[1] & 0xFF]) % 255] & 0xFF : 0;
|
||||||
|
int a2 = (b[2] != 0) ? sm_alog[(a + sm_log[b[2] & 0xFF]) % 255] & 0xFF : 0;
|
||||||
|
int a3 = (b[3] != 0) ? sm_alog[(a + sm_log[b[3] & 0xFF]) % 255] & 0xFF : 0;
|
||||||
|
return a0 << 24 | a1 << 16 | a2 << 8 | a3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
//CONSTRUCTOR
|
||||||
|
CRijndael();
|
||||||
|
|
||||||
|
//DESTRUCTOR
|
||||||
|
virtual ~CRijndael();
|
||||||
|
|
||||||
|
//Expand a user-supplied key material into a session key.
|
||||||
|
// key - The 128/192/256-bit user-key to use.
|
||||||
|
// chain - initial chain block for CBC and CFB modes.
|
||||||
|
// keylength - 16, 24 or 32 bytes
|
||||||
|
// blockSize - The block size in bytes of this Rijndael (16, 24 or 32 bytes).
|
||||||
|
void MakeKey(char const* key, char const* chain, int keylength = DEFAULT_BLOCK_SIZE, int blockSize = DEFAULT_BLOCK_SIZE);
|
||||||
|
|
||||||
|
private:
|
||||||
|
//Auxiliary Function
|
||||||
|
void Xor(char* buff, char const* chain)
|
||||||
|
{
|
||||||
|
if (false == m_bKeyInit)
|
||||||
|
throw runtime_error(sm_szErrorMsg1);
|
||||||
|
for (int i = 0; i<m_blockSize; i++)
|
||||||
|
*(buff++) ^= *(chain++);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Convenience method to encrypt exactly one block of plaintext, assuming
|
||||||
|
//Rijndael's default block size (128-bit).
|
||||||
|
// in - The plaintext
|
||||||
|
// result - The ciphertext generated from a plaintext using the key
|
||||||
|
void DefEncryptBlock(char const* in, char* result);
|
||||||
|
|
||||||
|
//Convenience method to decrypt exactly one block of plaintext, assuming
|
||||||
|
//Rijndael's default block size (128-bit).
|
||||||
|
// in - The ciphertext.
|
||||||
|
// result - The plaintext generated from a ciphertext using the session key.
|
||||||
|
void DefDecryptBlock(char const* in, char* result);
|
||||||
|
|
||||||
|
public:
|
||||||
|
//Encrypt exactly one block of plaintext.
|
||||||
|
// in - The plaintext.
|
||||||
|
// result - The ciphertext generated from a plaintext using the key.
|
||||||
|
void EncryptBlock(char const* in, char* result);
|
||||||
|
|
||||||
|
//Decrypt exactly one block of ciphertext.
|
||||||
|
// in - The ciphertext.
|
||||||
|
// result - The plaintext generated from a ciphertext using the session key.
|
||||||
|
void DecryptBlock(char const* in, char* result);
|
||||||
|
|
||||||
|
void Encrypt(char const* in, char* result, size_t n, int iMode = ECB);
|
||||||
|
|
||||||
|
void Decrypt(char const* in, char* result, size_t n, int iMode = ECB);
|
||||||
|
|
||||||
|
//Get Key Length
|
||||||
|
int GetKeyLength()
|
||||||
|
{
|
||||||
|
if (false == m_bKeyInit)
|
||||||
|
throw runtime_error(sm_szErrorMsg1);
|
||||||
|
return m_keylength;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Block Size
|
||||||
|
int GetBlockSize()
|
||||||
|
{
|
||||||
|
if (false == m_bKeyInit)
|
||||||
|
throw runtime_error(sm_szErrorMsg1);
|
||||||
|
return m_blockSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Number of Rounds
|
||||||
|
int GetRounds()
|
||||||
|
{
|
||||||
|
if (false == m_bKeyInit)
|
||||||
|
throw runtime_error(sm_szErrorMsg1);
|
||||||
|
return m_iROUNDS;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ResetChain()
|
||||||
|
{
|
||||||
|
memcpy(m_chain, m_chain0, m_blockSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
//Null chain
|
||||||
|
static char const* sm_chain0;
|
||||||
|
|
||||||
|
private:
|
||||||
|
static const int sm_alog[256];
|
||||||
|
static const int sm_log[256];
|
||||||
|
static const char sm_S[256];
|
||||||
|
static const char sm_Si[256];
|
||||||
|
static const int sm_T1[256];
|
||||||
|
static const int sm_T2[256];
|
||||||
|
static const int sm_T3[256];
|
||||||
|
static const int sm_T4[256];
|
||||||
|
static const int sm_T5[256];
|
||||||
|
static const int sm_T6[256];
|
||||||
|
static const int sm_T7[256];
|
||||||
|
static const int sm_T8[256];
|
||||||
|
static const int sm_U1[256];
|
||||||
|
static const int sm_U2[256];
|
||||||
|
static const int sm_U3[256];
|
||||||
|
static const int sm_U4[256];
|
||||||
|
static const char sm_rcon[30];
|
||||||
|
static const int sm_shifts[3][4][2];
|
||||||
|
//Error Messages
|
||||||
|
static char const* sm_szErrorMsg1;
|
||||||
|
static char const* sm_szErrorMsg2;
|
||||||
|
//Key Initialization Flag
|
||||||
|
bool m_bKeyInit;
|
||||||
|
//Encryption (m_Ke) round key
|
||||||
|
int m_Ke[MAX_ROUNDS + 1][MAX_BC];
|
||||||
|
//Decryption (m_Kd) round key
|
||||||
|
int m_Kd[MAX_ROUNDS + 1][MAX_BC];
|
||||||
|
//Key Length
|
||||||
|
int m_keylength;
|
||||||
|
//Block Size
|
||||||
|
int m_blockSize;
|
||||||
|
//Number of Rounds
|
||||||
|
int m_iROUNDS;
|
||||||
|
//Chain Block
|
||||||
|
char m_chain0[MAX_BLOCK_SIZE];
|
||||||
|
char m_chain[MAX_BLOCK_SIZE];
|
||||||
|
//Auxiliary private use buffers
|
||||||
|
int tk[MAX_KC];
|
||||||
|
int a[MAX_BC];
|
||||||
|
int t[MAX_BC];
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // __RIJNDAEL_H__
|
||||||
128
3rdparty/MultiEmulator/src/DoubleBuffering.cpp
vendored
Normal file
128
3rdparty/MultiEmulator/src/DoubleBuffering.cpp
vendored
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
//DoubleBuffering.cpp Source File
|
||||||
|
|
||||||
|
#include "DoubleBuffering.h"
|
||||||
|
#include <cassert>
|
||||||
|
#include <exception>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
CDoubleBuffering::CDoubleBuffering(ifstream& in, char* pcBuff, int iSize, int iDataLen) : m_rin(in),
|
||||||
|
m_iDataLen(iDataLen), m_bEOF(false), m_iSize(iSize), m_iSize2(iSize >> 1), m_pcBuff(pcBuff)
|
||||||
|
{
|
||||||
|
//m_iSize should be even
|
||||||
|
if(m_iSize%2 != 0)
|
||||||
|
throw runtime_error("CDoubleBuffering: m_iSize should be Even Number!");
|
||||||
|
//Check file
|
||||||
|
if(!in.is_open() || in.bad())
|
||||||
|
throw runtime_error("CDoubleBuffering: Referenced File not Opened or in Bad State!");
|
||||||
|
//Check construction data
|
||||||
|
if(m_iDataLen<1 || m_iSize2<m_iDataLen)
|
||||||
|
throw runtime_error("CDoubleBuffering: Illegal Construction Data!");
|
||||||
|
in.read(m_pcBuff, m_iSize2);
|
||||||
|
m_iEnd = m_rin.gcount();
|
||||||
|
m_iCurPos = 0;
|
||||||
|
m_iBuf = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CDoubleBuffering::GetData(char* pszDataBuf, int iDataLen)
|
||||||
|
{
|
||||||
|
if(-1 == iDataLen)
|
||||||
|
iDataLen = m_iDataLen;
|
||||||
|
if(iDataLen<1 || m_iSize2<iDataLen)
|
||||||
|
throw runtime_error("CDoubleBuffering::GetData(): Illegal iDataLen!");
|
||||||
|
if(true == m_bEOF)
|
||||||
|
return 0;
|
||||||
|
//Estimate the next position
|
||||||
|
int iCurPos = m_iCurPos + iDataLen;
|
||||||
|
if(0 == m_iBuf) //First Buffer
|
||||||
|
{
|
||||||
|
if(iCurPos >= m_iEnd)
|
||||||
|
{
|
||||||
|
//Read the next buffer
|
||||||
|
if(m_rin.eof())
|
||||||
|
{
|
||||||
|
m_bEOF = true;
|
||||||
|
//Take everything remained
|
||||||
|
int iRead = m_iEnd-m_iCurPos;
|
||||||
|
memcpy(pszDataBuf, m_pcBuff+m_iCurPos, iRead);
|
||||||
|
return iRead;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_rin.read(m_pcBuff+m_iEnd, m_iSize2);
|
||||||
|
m_iEnd += m_rin.gcount();
|
||||||
|
if(iCurPos > m_iEnd) //Still greater, then EOF attained
|
||||||
|
{
|
||||||
|
assert(m_rin.eof());
|
||||||
|
m_bEOF = true;
|
||||||
|
//Take everything remained
|
||||||
|
int iRead = m_iEnd-m_iCurPos;
|
||||||
|
memcpy(pszDataBuf, m_pcBuff+m_iCurPos, iRead);
|
||||||
|
return iRead;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
memcpy(pszDataBuf, m_pcBuff+m_iCurPos, iDataLen);
|
||||||
|
m_iCurPos = iCurPos;
|
||||||
|
assert(m_iCurPos >= m_iSize2);
|
||||||
|
m_iBuf = 1;
|
||||||
|
return iDataLen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
memcpy(pszDataBuf, m_pcBuff+m_iCurPos, iDataLen);
|
||||||
|
m_iCurPos = iCurPos;
|
||||||
|
return iDataLen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else //1 == m_iBuf, Second Buffer
|
||||||
|
{
|
||||||
|
if(iCurPos >= m_iEnd)
|
||||||
|
{
|
||||||
|
//Read the next buffer
|
||||||
|
if(m_rin.eof())
|
||||||
|
{
|
||||||
|
m_bEOF = true;
|
||||||
|
//Take everything remained
|
||||||
|
int iRead = m_iEnd-m_iCurPos;
|
||||||
|
memcpy(pszDataBuf, m_pcBuff+m_iCurPos, iRead);
|
||||||
|
return iRead;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_rin.read(m_pcBuff, m_iSize2);
|
||||||
|
m_iEnd = m_rin.gcount();
|
||||||
|
iCurPos %= m_iSize;
|
||||||
|
if(iCurPos > m_iEnd) //Still greater, then EOF attained
|
||||||
|
{
|
||||||
|
assert(m_rin.eof());
|
||||||
|
m_bEOF = true;
|
||||||
|
//Take everything remained
|
||||||
|
int iRead = m_iSize-m_iCurPos;
|
||||||
|
memcpy(pszDataBuf, m_pcBuff+m_iCurPos, iRead);
|
||||||
|
memcpy(pszDataBuf+iRead, m_pcBuff, m_iEnd);
|
||||||
|
return iRead + m_iEnd;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int iRead = m_iSize-m_iCurPos;
|
||||||
|
memcpy(pszDataBuf, m_pcBuff+m_iCurPos, iRead);
|
||||||
|
memcpy(pszDataBuf+iRead, m_pcBuff, iDataLen-iRead);
|
||||||
|
m_iCurPos = iCurPos;
|
||||||
|
assert(m_iCurPos < m_iSize2);
|
||||||
|
m_iBuf = 0;
|
||||||
|
return iDataLen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
memcpy(pszDataBuf, m_pcBuff+m_iCurPos, iDataLen);
|
||||||
|
m_iCurPos = iCurPos;
|
||||||
|
return iDataLen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
40
3rdparty/MultiEmulator/src/DoubleBuffering.h
vendored
Normal file
40
3rdparty/MultiEmulator/src/DoubleBuffering.h
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
//DoubleBuffering.h Header File
|
||||||
|
|
||||||
|
#ifndef __DOUBLEBUFFERING_H__
|
||||||
|
#define __DOUBLEBUFFERING_H__
|
||||||
|
|
||||||
|
//Typical DISCLAIMER:
|
||||||
|
//The code in this project is Copyright (C) 2003 by George Anescu. You have the right to
|
||||||
|
//use and distribute the code in any way you see fit as long as this paragraph is included
|
||||||
|
//with the distribution. No warranties or claims are made as to the validity of the
|
||||||
|
//information and code contained herein, so use it at your own risk.
|
||||||
|
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
class CDoubleBuffering
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
//Constructor
|
||||||
|
CDoubleBuffering(ifstream& in, char* pcBuff, int iSize, int iDataLen);
|
||||||
|
//Get Next Data Buffer
|
||||||
|
int GetData(char* pszDataBuf, int iDataLen=-1);
|
||||||
|
|
||||||
|
private:
|
||||||
|
ifstream& m_rin;
|
||||||
|
int m_iSize;
|
||||||
|
int m_iSize2; //m_iSize/2
|
||||||
|
int m_iDataLen;
|
||||||
|
//Current Position
|
||||||
|
int m_iCurPos;
|
||||||
|
//End Position
|
||||||
|
int m_iEnd;
|
||||||
|
//Which Buffer
|
||||||
|
int m_iBuf;
|
||||||
|
char* m_pcBuff;
|
||||||
|
//EOF attained
|
||||||
|
bool m_bEOF;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //__DOUBLEBUFFERING_H__
|
||||||
38
3rdparty/MultiEmulator/src/MessageDigest.cpp
vendored
Normal file
38
3rdparty/MultiEmulator/src/MessageDigest.cpp
vendored
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
//MessageDigest.cpp
|
||||||
|
|
||||||
|
#include "MessageDigest.h"
|
||||||
|
#include "DoubleBuffering.h"
|
||||||
|
|
||||||
|
#include <exception>
|
||||||
|
#include <fstream>
|
||||||
|
#include <strstream>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
//Digesting a Full File
|
||||||
|
void IMessageDigest::DigestFile(string const& rostrFileIn, char* pcDigest)
|
||||||
|
{
|
||||||
|
//Is the User's responsability to ensure that pcDigest is appropriately allocated
|
||||||
|
//Open Input File
|
||||||
|
ifstream in(rostrFileIn.c_str(), ios::binary);
|
||||||
|
if(!in)
|
||||||
|
{
|
||||||
|
ostrstream ostr;
|
||||||
|
ostr << "FileDigest ERROR: in IMessageDigest::DigestFile(): Cannot open File " << rostrFileIn << "!" << ends;
|
||||||
|
string ostrMsg = ostr.str();
|
||||||
|
ostr.freeze(false);
|
||||||
|
throw runtime_error(ostrMsg);
|
||||||
|
}
|
||||||
|
//Resetting first
|
||||||
|
Reset();
|
||||||
|
//Reading from file
|
||||||
|
char szLargeBuff[BUFF_LEN+1] = {0};
|
||||||
|
char szBuff[DATA_LEN+1] = {0};
|
||||||
|
CDoubleBuffering oDoubleBuffering(in, szLargeBuff, BUFF_LEN, DATA_LEN);
|
||||||
|
int iRead;
|
||||||
|
while((iRead=oDoubleBuffering.GetData(szBuff)) > 0)
|
||||||
|
AddData(szBuff, iRead);
|
||||||
|
in.close();
|
||||||
|
//Final Step
|
||||||
|
FinalDigest(pcDigest);
|
||||||
|
}
|
||||||
47
3rdparty/MultiEmulator/src/MessageDigest.h
vendored
Normal file
47
3rdparty/MultiEmulator/src/MessageDigest.h
vendored
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
//MessageDigest.h
|
||||||
|
|
||||||
|
#ifndef __MESSAGEDIGEST_H__
|
||||||
|
#define __MESSAGEDIGEST_H__
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
//Typical DISCLAIMER:
|
||||||
|
//The code in this project is Copyright (C) 2003 by George Anescu. You have the right to
|
||||||
|
//use and distribute the code in any way you see fit as long as this paragraph is included
|
||||||
|
//with the distribution. No warranties or claims are made as to the validity of the
|
||||||
|
//information and code contained herein, so use it at your own risk.
|
||||||
|
|
||||||
|
//General Message Digest Interface
|
||||||
|
class IMessageDigest
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
//CONSTRUCTOR
|
||||||
|
IMessageDigest() : m_bAddData(false) {}
|
||||||
|
//DESTRUCTOR
|
||||||
|
virtual ~IMessageDigest() {}
|
||||||
|
//Update context to reflect the concatenation of another buffer of bytes
|
||||||
|
virtual void AddData(char const* pcData, int iDataLength) = 0;
|
||||||
|
//Final wrapup - pad to BLOCKSIZE-byte boundary with the bit pattern
|
||||||
|
//10000...(64-bit count of bits processed, MSB-first)
|
||||||
|
virtual void FinalDigest(char* pcDigest) = 0;
|
||||||
|
//Reset current operation in order to prepare for a new one
|
||||||
|
virtual void Reset() = 0;
|
||||||
|
//Digesting a Full File
|
||||||
|
void DigestFile(string const& rostrFileIn, char* pcDigest);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
enum { BLOCKSIZE=64 };
|
||||||
|
//Control Flag
|
||||||
|
bool m_bAddData;
|
||||||
|
//The core of the MessageDigest algorithm, this alters an existing MessageDigest hash to
|
||||||
|
//reflect the addition of 64 bytes of new data
|
||||||
|
virtual void Transform() = 0;
|
||||||
|
|
||||||
|
private:
|
||||||
|
enum { DATA_LEN=384, BUFF_LEN=1024 };
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // __MESSAGEDIGEST_H__
|
||||||
|
|
||||||
13
3rdparty/MultiEmulator/src/OldRevEmu.cpp
vendored
Normal file
13
3rdparty/MultiEmulator/src/OldRevEmu.cpp
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#include "multi_emulator.h"
|
||||||
|
|
||||||
|
int GenerateOldRevEmu(void* pDest, int nSteamID)
|
||||||
|
{
|
||||||
|
auto pTicket = (int*)pDest;
|
||||||
|
auto pbTicket = (unsigned char*)pDest;
|
||||||
|
|
||||||
|
pTicket[0] = 0xFFFF; // +0, header
|
||||||
|
pTicket[1] = (nSteamID ^ 0xC9710266) << 1; // +4, SteamId
|
||||||
|
*(short *)&pbTicket[8] = 0; // +8, unknown, in original emulator must be 0
|
||||||
|
|
||||||
|
return 10;
|
||||||
|
}
|
||||||
27
3rdparty/MultiEmulator/src/RevEmu.cpp
vendored
Normal file
27
3rdparty/MultiEmulator/src/RevEmu.cpp
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
#include "multi_emulator.h"
|
||||||
|
#include "StrUtils.h"
|
||||||
|
#include "RevSpoofer.h"
|
||||||
|
|
||||||
|
int GenerateRevEmu(void *pDest, int nSteamID)
|
||||||
|
{
|
||||||
|
char szhwid[64];
|
||||||
|
|
||||||
|
CreateRandomString(szhwid, 16);
|
||||||
|
if (!RevSpoofer::Spoof(szhwid, nSteamID))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
auto pTicket = (int *)pDest;
|
||||||
|
auto revHash = RevSpoofer::Hash(szhwid);
|
||||||
|
|
||||||
|
pTicket[0] = 'J'; // +0, header
|
||||||
|
pTicket[1] = revHash; // +4, hash of string at +24 offset
|
||||||
|
pTicket[2] = 'r' << 16 | 'e' << 8 | 'v';// +8, magic number
|
||||||
|
pTicket[3] = 0; // +12, unknown number, must always be 0
|
||||||
|
|
||||||
|
pTicket[4] = revHash << 1; // +16, SteamId, Low part
|
||||||
|
pTicket[5] = 0x01100001; // +20, SteamId, High part
|
||||||
|
|
||||||
|
strcpy((char *)&pTicket[6], szhwid); // +24, string for hash
|
||||||
|
|
||||||
|
return 152;
|
||||||
|
}
|
||||||
55
3rdparty/MultiEmulator/src/RevEmu2013.cpp
vendored
Normal file
55
3rdparty/MultiEmulator/src/RevEmu2013.cpp
vendored
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
#include "multi_emulator.h"
|
||||||
|
#include "StrUtils.h"
|
||||||
|
#include "RevSpoofer.h"
|
||||||
|
#include "CRijndael.h"
|
||||||
|
#include "SHA.h"
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
int GenerateRevEmu2013(void *pDest, int nSteamID)
|
||||||
|
{
|
||||||
|
char szhwid[64];
|
||||||
|
|
||||||
|
CreateRandomString(szhwid, 32);
|
||||||
|
if (!RevSpoofer::Spoof(szhwid, nSteamID))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
auto pTicket = (int *)pDest;
|
||||||
|
auto pbTicket = (unsigned char *)pDest;
|
||||||
|
|
||||||
|
auto revHash = RevSpoofer::Hash(szhwid);
|
||||||
|
|
||||||
|
pTicket[0] = 'S'; // +0
|
||||||
|
pTicket[1] = revHash; // +4
|
||||||
|
pTicket[2] = 'r' << 16 | 'e' << 8 | 'v';;// +8
|
||||||
|
pTicket[3] = 0; // +12
|
||||||
|
pTicket[4] = revHash << 1; // +16
|
||||||
|
pTicket[5] = 0x01100001; // +20
|
||||||
|
pTicket[6] = (int)time(0) + 90123; // +24
|
||||||
|
pbTicket[27] = ~(pbTicket[27] + pbTicket[24]);
|
||||||
|
pTicket[7] = ~(int)time(0); // +28
|
||||||
|
pTicket[8] = revHash * 2 >> 3; // +32
|
||||||
|
pTicket[9] = 0; // +36
|
||||||
|
|
||||||
|
static const char c_szAESKeyRand[] = "0123456789ABCDEFGHIJKLMNOPQRSTUV";
|
||||||
|
|
||||||
|
char szAESHashRand[32];
|
||||||
|
auto AESRand = CRijndael();
|
||||||
|
AESRand.MakeKey(c_szAESKeyRand, CRijndael::sm_chain0, 32, 32);
|
||||||
|
AESRand.EncryptBlock(szhwid, szAESHashRand);
|
||||||
|
memcpy(&pbTicket[40], szAESHashRand, 32);
|
||||||
|
|
||||||
|
static const char c_szAESKeyRev[] = "_YOU_SERIOUSLY_NEED_TO_GET_LAID_";
|
||||||
|
char AESHashRev[32];
|
||||||
|
auto AESRev = CRijndael();
|
||||||
|
AESRev.MakeKey(c_szAESKeyRev, CRijndael::sm_chain0, 32, 32);
|
||||||
|
AESRev.EncryptBlock(c_szAESKeyRand, AESHashRev);
|
||||||
|
memcpy(&pbTicket[72], AESHashRev, 32);
|
||||||
|
|
||||||
|
char szSHAHash[32];
|
||||||
|
auto sha = CSHA(CSHA::SHA256);
|
||||||
|
sha.AddData(szhwid, 32);
|
||||||
|
sha.FinalDigest(szSHAHash);
|
||||||
|
memcpy(&pbTicket[104], szSHAHash, 32);
|
||||||
|
|
||||||
|
return 194;
|
||||||
|
}
|
||||||
96
3rdparty/MultiEmulator/src/RevSpoofer.cpp
vendored
Normal file
96
3rdparty/MultiEmulator/src/RevSpoofer.cpp
vendored
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
#include "RevSpoofer.h"
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#define astrlen(x) sizeof(x) - 1
|
||||||
|
|
||||||
|
static char s_szDictionary[] = { "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" };
|
||||||
|
|
||||||
|
static int iInputLen;
|
||||||
|
static unsigned int uTreasure;
|
||||||
|
|
||||||
|
bool ScanLast3(char *pszInput, unsigned int uPrevHash)
|
||||||
|
{
|
||||||
|
unsigned int h1, h2, h3, hh;
|
||||||
|
for (int i1 = 0; i1 < astrlen(s_szDictionary); i1++)
|
||||||
|
{
|
||||||
|
h1 = uPrevHash ^ ((uPrevHash >> 2) + (uPrevHash << 5) + s_szDictionary[i1]);
|
||||||
|
hh = h1 ^ ((h1 >> 2) + (h1 << 5));
|
||||||
|
hh = hh ^ ((hh >> 2) + (hh << 5));
|
||||||
|
|
||||||
|
if ((hh ^ uTreasure) >> (8 + 5 + 3))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
for (int i2 = 0; i2 < astrlen(s_szDictionary); i2++)
|
||||||
|
{
|
||||||
|
h2 = h1 ^ ((h1 >> 2) + (h1 << 5) + s_szDictionary[i2]);
|
||||||
|
hh = h2 ^ ((h2 >> 2) + (h2 << 5));
|
||||||
|
if ((hh ^ uTreasure) >> (8 + 3))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
for (int i3 = 0; i3 < astrlen(s_szDictionary); i3++)
|
||||||
|
{
|
||||||
|
h3 = h2 ^ ((h2 >> 2) + (h2 << 5) + s_szDictionary[i3]);
|
||||||
|
if (h3 == uTreasure)
|
||||||
|
{
|
||||||
|
pszInput[iInputLen - 3] = s_szDictionary[i1];
|
||||||
|
pszInput[iInputLen - 2] = s_szDictionary[i2];
|
||||||
|
pszInput[iInputLen - 1] = s_szDictionary[i3];
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ScanNext(char* pszInput, int uIndex, unsigned int uPrevHash)
|
||||||
|
{
|
||||||
|
bool res;
|
||||||
|
|
||||||
|
for (int i = 0; i < astrlen(s_szDictionary); i++)
|
||||||
|
{
|
||||||
|
auto h = uPrevHash ^ ((uPrevHash >> 2) + (uPrevHash << 5) + s_szDictionary[i]);
|
||||||
|
|
||||||
|
if (uIndex + 1 < iInputLen - 3)
|
||||||
|
res = ScanNext(pszInput, uIndex + 1, h);
|
||||||
|
else
|
||||||
|
res = ScanLast3(pszInput, h);
|
||||||
|
|
||||||
|
if (res)
|
||||||
|
{
|
||||||
|
pszInput[uIndex] = s_szDictionary[i];
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace RevSpoofer
|
||||||
|
{
|
||||||
|
bool Spoof(char *pszDest, int uSID)
|
||||||
|
{
|
||||||
|
uTreasure = uSID;
|
||||||
|
iInputLen = strlen(pszDest);
|
||||||
|
|
||||||
|
auto i = iInputLen - 7;
|
||||||
|
i = (i < 0) ? 0 : i;
|
||||||
|
pszDest[i] = '\0';
|
||||||
|
auto h = Hash(pszDest);
|
||||||
|
return ScanNext(pszDest, i, h);
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int Hash(char *pszString)
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
unsigned int nHash = 0x4E67C6A7;
|
||||||
|
int c = pszString[i++];
|
||||||
|
|
||||||
|
while (c)
|
||||||
|
{
|
||||||
|
nHash = nHash ^ ((nHash >> 2) + (nHash << 5) + c);
|
||||||
|
c = pszString[i++];
|
||||||
|
}
|
||||||
|
|
||||||
|
return nHash;
|
||||||
|
}
|
||||||
|
}
|
||||||
7
3rdparty/MultiEmulator/src/RevSpoofer.h
vendored
Normal file
7
3rdparty/MultiEmulator/src/RevSpoofer.h
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace RevSpoofer
|
||||||
|
{
|
||||||
|
bool Spoof(char *pszDest, int uSID);
|
||||||
|
unsigned int Hash(char *pszString);
|
||||||
|
}
|
||||||
52
3rdparty/MultiEmulator/src/SC2009.cpp
vendored
Normal file
52
3rdparty/MultiEmulator/src/SC2009.cpp
vendored
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
#include "multi_emulator.h"
|
||||||
|
#include "StrUtils.h"
|
||||||
|
#include "RevSpoofer.h"
|
||||||
|
#include "CRijndael.h"
|
||||||
|
#include "SHA.h"
|
||||||
|
|
||||||
|
int GenerateSC2009(void* pDest, int nSteamID)
|
||||||
|
{
|
||||||
|
char hwid[64];
|
||||||
|
|
||||||
|
CreateRandomString(hwid, 32);
|
||||||
|
if (!RevSpoofer::Spoof(hwid, nSteamID))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
auto pTicket = (int*)pDest;
|
||||||
|
auto pbTicket = (unsigned char*)pDest;
|
||||||
|
|
||||||
|
auto revHash = RevSpoofer::Hash(hwid);
|
||||||
|
|
||||||
|
pTicket[0] = 'S'; // +0
|
||||||
|
pTicket[1] = revHash; // +4
|
||||||
|
pTicket[2] = 'r' << 16 | 'e' << 8 | 'v';;// +8
|
||||||
|
pTicket[3] = 0; // +12
|
||||||
|
pTicket[4] = revHash << 1; // +16
|
||||||
|
pTicket[5] = 0x01100001; // +20
|
||||||
|
|
||||||
|
/* Encrypt HWID with AESKeyRand key and save it in the ticket. */
|
||||||
|
static const char AESKeyRand[] = "0123456789ABCDEFGHIJKLMNOPQRSTUV";
|
||||||
|
char AESHashRand[32];
|
||||||
|
auto AESRand = CRijndael();
|
||||||
|
AESRand.MakeKey(AESKeyRand, CRijndael::sm_chain0, 32, 32);
|
||||||
|
AESRand.EncryptBlock(hwid, AESHashRand);
|
||||||
|
memcpy(&pbTicket[24], AESHashRand, 32);
|
||||||
|
|
||||||
|
/* Encrypt AESKeyRand with AESKeyRev key and save it in the ticket.
|
||||||
|
* AESKeyRev key is identical to the key in dproto/reunion. */
|
||||||
|
static const char AESKeyRev[] = "_YOU_SERIOUSLY_NEED_TO_GET_LAID_";
|
||||||
|
char AESHashRev[32];
|
||||||
|
auto AESRev = CRijndael();
|
||||||
|
AESRev.MakeKey(AESKeyRev, CRijndael::sm_chain0, 32, 32);
|
||||||
|
AESRev.EncryptBlock(AESKeyRand, AESHashRev);
|
||||||
|
memcpy(&pbTicket[56], AESHashRev, 32);
|
||||||
|
|
||||||
|
/* Perform HWID hashing and save hash to the ticket. */
|
||||||
|
char SHAHash[32];
|
||||||
|
auto sha = CSHA(CSHA::SHA256);
|
||||||
|
sha.AddData(hwid, 32);
|
||||||
|
sha.FinalDigest(SHAHash);
|
||||||
|
memcpy(&pbTicket[88], SHAHash, 32);
|
||||||
|
|
||||||
|
return 178;
|
||||||
|
}
|
||||||
734
3rdparty/MultiEmulator/src/SHA.cpp
vendored
Normal file
734
3rdparty/MultiEmulator/src/SHA.cpp
vendored
Normal file
@@ -0,0 +1,734 @@
|
|||||||
|
//SHA.cpp
|
||||||
|
#include "SHA.h"
|
||||||
|
#include <exception>
|
||||||
|
#include <strstream>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
const unsigned int CSHA::sm_K160[4] =
|
||||||
|
{
|
||||||
|
0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6
|
||||||
|
};
|
||||||
|
|
||||||
|
const unsigned int CSHA::sm_H160[SHA160LENGTH] =
|
||||||
|
{
|
||||||
|
0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0
|
||||||
|
};
|
||||||
|
|
||||||
|
const unsigned int CSHA::sm_K256[64] =
|
||||||
|
{
|
||||||
|
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
|
||||||
|
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
|
||||||
|
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
|
||||||
|
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
|
||||||
|
0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
|
||||||
|
0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
|
||||||
|
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
|
||||||
|
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
|
||||||
|
};
|
||||||
|
|
||||||
|
const unsigned int CSHA::sm_H256[SHA256LENGTH] =
|
||||||
|
{
|
||||||
|
0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,
|
||||||
|
0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19
|
||||||
|
};
|
||||||
|
|
||||||
|
const SUI64 CSHA::sm_H384[SHA512LENGTH] =
|
||||||
|
{
|
||||||
|
{0xcbbb9d5d, 0xc1059ed8},
|
||||||
|
{0x629a292a, 0x367cd507},
|
||||||
|
{0x9159015a, 0x3070dd17},
|
||||||
|
{0x152fecd8, 0xf70e5939},
|
||||||
|
{0x67332667, 0xffc00b31},
|
||||||
|
{0x8eb44a87, 0x68581511},
|
||||||
|
{0xdb0c2e0d, 0x64f98fa7},
|
||||||
|
{0x47b5481d, 0xbefa4fa4}
|
||||||
|
};
|
||||||
|
|
||||||
|
const SUI64 CSHA::sm_K512[80] =
|
||||||
|
{
|
||||||
|
{0x428a2f98, 0xd728ae22}, {0x71374491, 0x23ef65cd},
|
||||||
|
{0xb5c0fbcf, 0xec4d3b2f}, {0xe9b5dba5, 0x8189dbbc},
|
||||||
|
{0x3956c25b, 0xf348b538}, {0x59f111f1, 0xb605d019},
|
||||||
|
{0x923f82a4, 0xaf194f9b}, {0xab1c5ed5, 0xda6d8118},
|
||||||
|
{0xd807aa98, 0xa3030242}, {0x12835b01, 0x45706fbe},
|
||||||
|
{0x243185be, 0x4ee4b28c}, {0x550c7dc3, 0xd5ffb4e2},
|
||||||
|
{0x72be5d74, 0xf27b896f}, {0x80deb1fe, 0x3b1696b1},
|
||||||
|
{0x9bdc06a7, 0x25c71235}, {0xc19bf174, 0xcf692694},
|
||||||
|
{0xe49b69c1, 0x9ef14ad2}, {0xefbe4786, 0x384f25e3},
|
||||||
|
{0x0fc19dc6, 0x8b8cd5b5}, {0x240ca1cc, 0x77ac9c65},
|
||||||
|
{0x2de92c6f, 0x592b0275}, {0x4a7484aa, 0x6ea6e483},
|
||||||
|
{0x5cb0a9dc, 0xbd41fbd4}, {0x76f988da, 0x831153b5},
|
||||||
|
{0x983e5152, 0xee66dfab}, {0xa831c66d, 0x2db43210},
|
||||||
|
{0xb00327c8, 0x98fb213f}, {0xbf597fc7, 0xbeef0ee4},
|
||||||
|
{0xc6e00bf3, 0x3da88fc2}, {0xd5a79147, 0x930aa725},
|
||||||
|
{0x06ca6351, 0xe003826f}, {0x14292967, 0x0a0e6e70},
|
||||||
|
{0x27b70a85, 0x46d22ffc}, {0x2e1b2138, 0x5c26c926},
|
||||||
|
{0x4d2c6dfc, 0x5ac42aed}, {0x53380d13, 0x9d95b3df},
|
||||||
|
{0x650a7354, 0x8baf63de}, {0x766a0abb, 0x3c77b2a8},
|
||||||
|
{0x81c2c92e, 0x47edaee6}, {0x92722c85, 0x1482353b},
|
||||||
|
{0xa2bfe8a1, 0x4cf10364}, {0xa81a664b, 0xbc423001},
|
||||||
|
{0xc24b8b70, 0xd0f89791}, {0xc76c51a3, 0x0654be30},
|
||||||
|
{0xd192e819, 0xd6ef5218}, {0xd6990624, 0x5565a910},
|
||||||
|
{0xf40e3585, 0x5771202a}, {0x106aa070, 0x32bbd1b8},
|
||||||
|
{0x19a4c116, 0xb8d2d0c8}, {0x1e376c08, 0x5141ab53},
|
||||||
|
{0x2748774c, 0xdf8eeb99}, {0x34b0bcb5, 0xe19b48a8},
|
||||||
|
{0x391c0cb3, 0xc5c95a63}, {0x4ed8aa4a, 0xe3418acb},
|
||||||
|
{0x5b9cca4f, 0x7763e373}, {0x682e6ff3, 0xd6b2b8a3},
|
||||||
|
{0x748f82ee, 0x5defb2fc}, {0x78a5636f, 0x43172f60},
|
||||||
|
{0x84c87814, 0xa1f0ab72}, {0x8cc70208, 0x1a6439ec},
|
||||||
|
{0x90befffa, 0x23631e28}, {0xa4506ceb, 0xde82bde9},
|
||||||
|
{0xbef9a3f7, 0xb2c67915}, {0xc67178f2, 0xe372532b},
|
||||||
|
{0xca273ece, 0xea26619c}, {0xd186b8c7, 0x21c0c207},
|
||||||
|
{0xeada7dd6, 0xcde0eb1e}, {0xf57d4f7f, 0xee6ed178},
|
||||||
|
{0x06f067aa, 0x72176fba}, {0x0a637dc5, 0xa2c898a6},
|
||||||
|
{0x113f9804, 0xbef90dae}, {0x1b710b35, 0x131c471b},
|
||||||
|
{0x28db77f5, 0x23047d84}, {0x32caab7b, 0x40c72493},
|
||||||
|
{0x3c9ebe0a, 0x15c9bebc}, {0x431d67c4, 0x9c100d4c},
|
||||||
|
{0x4cc5d4be, 0xcb3e42b6}, {0x597f299c, 0xfc657e2a},
|
||||||
|
{0x5fcb6fab, 0x3ad6faec}, {0x6c44198c, 0x4a475817}
|
||||||
|
};
|
||||||
|
|
||||||
|
const SUI64 CSHA::sm_H512[SHA512LENGTH] =
|
||||||
|
{
|
||||||
|
{0x6a09e667, 0xf3bcc908},
|
||||||
|
{0xbb67ae85, 0x84caa73b},
|
||||||
|
{0x3c6ef372, 0xfe94f82b},
|
||||||
|
{0xa54ff53a, 0x5f1d36f1},
|
||||||
|
{0x510e527f, 0xade682d1},
|
||||||
|
{0x9b05688c, 0x2b3e6c1f},
|
||||||
|
{0x1f83d9ab, 0xfb41bd6b},
|
||||||
|
{0x5be0cd19, 0x137e2179}
|
||||||
|
};
|
||||||
|
|
||||||
|
//CONSTRUCTOR
|
||||||
|
CSHA::CSHA(int iMethod)
|
||||||
|
{
|
||||||
|
//Check the method
|
||||||
|
switch(iMethod)
|
||||||
|
{
|
||||||
|
case SHA160:
|
||||||
|
{
|
||||||
|
for(int i=0; i<SHA160LENGTH; i++)
|
||||||
|
m_auiBuf[i] = sm_H160[i];
|
||||||
|
m_auiBits[0] = 0;
|
||||||
|
m_auiBits[1] = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SHA256:
|
||||||
|
{
|
||||||
|
for(int i=0; i<SHA256LENGTH; i++)
|
||||||
|
m_auiBuf[i] = sm_H256[i];
|
||||||
|
m_auiBits[0] = 0;
|
||||||
|
m_auiBits[1] = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SHA384:
|
||||||
|
{
|
||||||
|
for(int i=0; i<SHA512LENGTH; i++)
|
||||||
|
m_aoui64Buf[i] = sm_H384[i];
|
||||||
|
m_aoui64Bits[0].m_uiLeft = 0;
|
||||||
|
m_aoui64Bits[0].m_uiRight = 0;
|
||||||
|
m_aoui64Bits[1].m_uiLeft = 0;
|
||||||
|
m_aoui64Bits[1].m_uiRight = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SHA512:
|
||||||
|
{
|
||||||
|
for(int i=0; i<SHA512LENGTH; i++)
|
||||||
|
m_aoui64Buf[i] = sm_H512[i];
|
||||||
|
m_aoui64Bits[0].m_uiLeft = 0;
|
||||||
|
m_aoui64Bits[0].m_uiRight = 0;
|
||||||
|
m_aoui64Bits[1].m_uiLeft = 0;
|
||||||
|
m_aoui64Bits[1].m_uiRight = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
ostrstream ostr;
|
||||||
|
ostr << "FileDigest ERROR: in CSHA() Constructor, Illegal Method " << iMethod << "!" << ends;
|
||||||
|
string ostrMsg = ostr.str();
|
||||||
|
ostr.freeze(false);
|
||||||
|
throw runtime_error(ostrMsg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m_iMethod = iMethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Update context to reflect the concatenation of another buffer of bytes.
|
||||||
|
void CSHA::AddData(char const* pcData, int iDataLength)
|
||||||
|
{
|
||||||
|
if(iDataLength < 0)
|
||||||
|
throw runtime_error(string("FileDigest ERROR: in CSHA::AddData(), Data Length should be >= 0!"));
|
||||||
|
unsigned int uiT;
|
||||||
|
switch(m_iMethod)
|
||||||
|
{
|
||||||
|
case SHA160:
|
||||||
|
case SHA256:
|
||||||
|
{
|
||||||
|
//Update bitcount
|
||||||
|
uiT = m_auiBits[0];
|
||||||
|
if((m_auiBits[0] = uiT + ((unsigned int)iDataLength << 3)) < uiT)
|
||||||
|
m_auiBits[1]++; //Carry from low to high
|
||||||
|
m_auiBits[1] += iDataLength >> 29;
|
||||||
|
uiT = (uiT >> 3) & (BLOCKSIZE-1); //Bytes already
|
||||||
|
//Handle any leading odd-sized chunks
|
||||||
|
if(uiT != 0)
|
||||||
|
{
|
||||||
|
unsigned char* puc = (unsigned char*)m_aucIn + uiT;
|
||||||
|
uiT = BLOCKSIZE - uiT;
|
||||||
|
if(iDataLength < uiT)
|
||||||
|
{
|
||||||
|
memcpy(puc, pcData, iDataLength);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
memcpy(puc, pcData, uiT);
|
||||||
|
Transform();
|
||||||
|
pcData += uiT;
|
||||||
|
iDataLength -= uiT;
|
||||||
|
}
|
||||||
|
//Process data in 64-byte chunks
|
||||||
|
while(iDataLength >= BLOCKSIZE)
|
||||||
|
{
|
||||||
|
memcpy(m_aucIn, pcData, BLOCKSIZE);
|
||||||
|
Transform();
|
||||||
|
pcData += BLOCKSIZE;
|
||||||
|
iDataLength -= BLOCKSIZE;
|
||||||
|
}
|
||||||
|
//Handle any remaining bytes of data
|
||||||
|
memcpy(m_aucIn, pcData, iDataLength);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SHA384:
|
||||||
|
case SHA512:
|
||||||
|
{
|
||||||
|
uiT = m_aoui64Bits[0].m_uiRight;
|
||||||
|
unsigned int uiU = m_aoui64Bits[0].m_uiLeft;
|
||||||
|
if((m_aoui64Bits[0].m_uiRight = uiT + ((unsigned int)iDataLength << 3)) < uiT)
|
||||||
|
m_aoui64Bits[0].m_uiLeft++; //Carry from low to high
|
||||||
|
unsigned int uiV = m_aoui64Bits[1].m_uiRight;
|
||||||
|
if((m_aoui64Bits[0].m_uiLeft += iDataLength >> 29) < uiU)
|
||||||
|
m_aoui64Bits[1].m_uiRight++;
|
||||||
|
if(m_aoui64Bits[1].m_uiRight < uiV)
|
||||||
|
m_aoui64Bits[1].m_uiLeft++;
|
||||||
|
uiT = (uiT >> 3) & (BLOCKSIZE2-1); //Bytes already
|
||||||
|
//Handle any leading odd-sized chunks
|
||||||
|
if(uiT != 0)
|
||||||
|
{
|
||||||
|
unsigned char* puc = (unsigned char*)m_aucIn + uiT;
|
||||||
|
uiT = BLOCKSIZE2 - uiT;
|
||||||
|
if(iDataLength < uiT)
|
||||||
|
{
|
||||||
|
memcpy(puc, pcData, iDataLength);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
memcpy(puc, pcData, uiT);
|
||||||
|
Transform();
|
||||||
|
pcData += uiT;
|
||||||
|
iDataLength -= uiT;
|
||||||
|
}
|
||||||
|
//Process data in 64-byte chunks
|
||||||
|
while(iDataLength >= BLOCKSIZE2)
|
||||||
|
{
|
||||||
|
memcpy(m_aucIn, pcData, BLOCKSIZE2);
|
||||||
|
Transform();
|
||||||
|
pcData += BLOCKSIZE2;
|
||||||
|
iDataLength -= BLOCKSIZE2;
|
||||||
|
}
|
||||||
|
//Handle any remaining bytes of data
|
||||||
|
memcpy(m_aucIn, pcData, iDataLength);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//Set the flag
|
||||||
|
m_bAddData = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Final wrapup - pad to 64-byte boundary with the bit pattern
|
||||||
|
//1 0*(64-bit count of bits processed, MSB-first)
|
||||||
|
void CSHA::FinalDigest(char* pcDigest)
|
||||||
|
{
|
||||||
|
//Is the User's responsability to ensure that pcDigest is properly allocated 20, 32,
|
||||||
|
//48 or 64 bytes, depending on the method
|
||||||
|
if(false == m_bAddData)
|
||||||
|
throw runtime_error(string("FileDigest ERROR: in CSHA::FinalDigest(), No data Added before call!"));
|
||||||
|
switch(m_iMethod)
|
||||||
|
{
|
||||||
|
case SHA160:
|
||||||
|
case SHA256:
|
||||||
|
{
|
||||||
|
unsigned int uiCount;
|
||||||
|
unsigned char *puc;
|
||||||
|
//Compute number of bytes mod 64
|
||||||
|
uiCount = (m_auiBits[0] >> 3) & (BLOCKSIZE-1);
|
||||||
|
//Set the first char of padding to 0x80. This is safe since there is
|
||||||
|
//always at least one byte free
|
||||||
|
puc = m_aucIn + uiCount;
|
||||||
|
*puc++ = 0x80;
|
||||||
|
//Bytes of padding needed to make 64 bytes
|
||||||
|
uiCount = BLOCKSIZE - uiCount - 1;
|
||||||
|
//Pad out to 56 mod 64
|
||||||
|
if(uiCount < 8)
|
||||||
|
{
|
||||||
|
//Two lots of padding: Pad the first block to 64 bytes
|
||||||
|
memset(puc, 0, uiCount);
|
||||||
|
Transform();
|
||||||
|
//Now fill the next block with 56 bytes
|
||||||
|
memset(m_aucIn, 0, BLOCKSIZE-8);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Pad block to 56 bytes
|
||||||
|
memset(puc, 0, uiCount - 8);
|
||||||
|
}
|
||||||
|
//Append length in bits and transform
|
||||||
|
Word2Bytes(m_auiBits[1], &m_aucIn[BLOCKSIZE-8]);
|
||||||
|
Word2Bytes(m_auiBits[0], &m_aucIn[BLOCKSIZE-4]);
|
||||||
|
Transform();
|
||||||
|
switch(m_iMethod)
|
||||||
|
{
|
||||||
|
case SHA160:
|
||||||
|
{
|
||||||
|
for(int i=0; i<SHA160LENGTH; i++,pcDigest+=4)
|
||||||
|
Word2Bytes(m_auiBuf[i], reinterpret_cast<unsigned char*>(pcDigest));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SHA256:
|
||||||
|
{
|
||||||
|
for(int i=0; i<SHA256LENGTH; i++,pcDigest+=4)
|
||||||
|
Word2Bytes(m_auiBuf[i], reinterpret_cast<unsigned char*>(pcDigest));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SHA384:
|
||||||
|
case SHA512:
|
||||||
|
{
|
||||||
|
unsigned char *puc;
|
||||||
|
//Compute number of bytes mod 128
|
||||||
|
unsigned int uiCount = (m_aoui64Bits[0].m_uiRight >> 3) & (BLOCKSIZE2-1);
|
||||||
|
//Set the first char of padding to 0x80. This is safe since there is
|
||||||
|
//always at least one byte free
|
||||||
|
puc = m_aucIn + uiCount;
|
||||||
|
*puc++ = 0x80;
|
||||||
|
//Bytes of padding needed to make 128 bytes
|
||||||
|
uiCount = BLOCKSIZE2 - uiCount - 1;
|
||||||
|
//Pad out to 112 mod 128
|
||||||
|
if(uiCount < 16)
|
||||||
|
{
|
||||||
|
//Two lots of padding: Pad the first block to 128 bytes
|
||||||
|
memset(puc, 0, uiCount);
|
||||||
|
Transform();
|
||||||
|
//Now fill the next block with 112 bytes
|
||||||
|
memset(m_aucIn, 0, BLOCKSIZE2-16);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Pad block to 112 bytes
|
||||||
|
memset(puc, 0, uiCount - 16);
|
||||||
|
}
|
||||||
|
//Append length in bits and transform
|
||||||
|
Word2Bytes(m_aoui64Bits[1], &m_aucIn[BLOCKSIZE2-16]);
|
||||||
|
Word2Bytes(m_aoui64Bits[0], &m_aucIn[BLOCKSIZE2-8]);
|
||||||
|
Transform();
|
||||||
|
switch(m_iMethod)
|
||||||
|
{
|
||||||
|
case SHA384:
|
||||||
|
{
|
||||||
|
for(int i=0; i<SHA384LENGTH; i++,pcDigest+=8)
|
||||||
|
Word2Bytes(m_aoui64Buf[i], reinterpret_cast<unsigned char*>(pcDigest));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SHA512:
|
||||||
|
{
|
||||||
|
for(int i=0; i<SHA512LENGTH; i++,pcDigest+=8)
|
||||||
|
Word2Bytes(m_aoui64Buf[i], reinterpret_cast<unsigned char*>(pcDigest));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//Reinitialize
|
||||||
|
Reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Reset current operation in order to prepare a new one
|
||||||
|
void CSHA::Reset()
|
||||||
|
{
|
||||||
|
//Reinitialize
|
||||||
|
switch(m_iMethod)
|
||||||
|
{
|
||||||
|
case SHA160:
|
||||||
|
{
|
||||||
|
for(int i=0; i<SHA160LENGTH; i++)
|
||||||
|
m_auiBuf[i] = sm_H160[i];
|
||||||
|
m_auiBits[0] = 0;
|
||||||
|
m_auiBits[1] = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SHA256:
|
||||||
|
{
|
||||||
|
for(int i=0; i<SHA256LENGTH; i++)
|
||||||
|
m_auiBuf[i] = sm_H256[i];
|
||||||
|
m_auiBits[0] = 0;
|
||||||
|
m_auiBits[1] = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SHA384:
|
||||||
|
{
|
||||||
|
for(int i=0; i<SHA512LENGTH; i++)
|
||||||
|
m_aoui64Buf[i] = sm_H384[i];
|
||||||
|
m_aoui64Bits[0].m_uiLeft = 0;
|
||||||
|
m_aoui64Bits[0].m_uiRight = 0;
|
||||||
|
m_aoui64Bits[1].m_uiLeft = 0;
|
||||||
|
m_aoui64Bits[1].m_uiRight = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SHA512:
|
||||||
|
{
|
||||||
|
for(int i=0; i<SHA512LENGTH; i++)
|
||||||
|
m_aoui64Buf[i] = sm_H512[i];
|
||||||
|
m_aoui64Bits[0].m_uiLeft = 0;
|
||||||
|
m_aoui64Bits[0].m_uiRight = 0;
|
||||||
|
m_aoui64Bits[1].m_uiLeft = 0;
|
||||||
|
m_aoui64Bits[1].m_uiRight = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Reset the flag
|
||||||
|
m_bAddData = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//The core of the SHA algorithm, this alters an existing SHA hash to
|
||||||
|
//reflect the addition of 16 longwords of new data.
|
||||||
|
void CSHA::Transform()
|
||||||
|
{
|
||||||
|
switch(m_iMethod)
|
||||||
|
{
|
||||||
|
case SHA160:
|
||||||
|
{
|
||||||
|
//Expansion of m_aucIn
|
||||||
|
unsigned char* pucIn = m_aucIn;
|
||||||
|
unsigned int auiW[80];
|
||||||
|
int i;
|
||||||
|
for(i=0; i<16; i++,pucIn+=4)
|
||||||
|
Bytes2Word(pucIn, auiW[i]);
|
||||||
|
for(i=16; i<80; i++)
|
||||||
|
auiW[i] = CircularShift(1, auiW[i-3]^auiW[i-8]^auiW[i-14]^auiW[i-16]);
|
||||||
|
unsigned int temp;
|
||||||
|
unsigned int A, B, C, D, E;
|
||||||
|
A = m_auiBuf[0];
|
||||||
|
B = m_auiBuf[1];
|
||||||
|
C = m_auiBuf[2];
|
||||||
|
D = m_auiBuf[3];
|
||||||
|
E = m_auiBuf[4];
|
||||||
|
for(i=0; i<20; i++)
|
||||||
|
{
|
||||||
|
temp = CircularShift(5, A) + ((B & C) | ((~B) & D)) + E + auiW[i] + sm_K160[0];
|
||||||
|
E = D;
|
||||||
|
D = C;
|
||||||
|
C = CircularShift(30, B);
|
||||||
|
B = A;
|
||||||
|
A = temp;
|
||||||
|
}
|
||||||
|
for(i=20; i<40; i++)
|
||||||
|
{
|
||||||
|
temp = CircularShift(5, A) + (B ^ C ^ D) + E + auiW[i] + sm_K160[1];
|
||||||
|
E = D;
|
||||||
|
D = C;
|
||||||
|
C = CircularShift(30, B);
|
||||||
|
B = A;
|
||||||
|
A = temp;
|
||||||
|
}
|
||||||
|
for(i=40; i<60; i++)
|
||||||
|
{
|
||||||
|
temp = CircularShift(5, A) + ((B & C) | (B & D) | (C & D)) + E + auiW[i] + sm_K160[2];
|
||||||
|
E = D;
|
||||||
|
D = C;
|
||||||
|
C = CircularShift(30, B);
|
||||||
|
B = A;
|
||||||
|
A = temp;
|
||||||
|
}
|
||||||
|
for(i=60; i<80; i++)
|
||||||
|
{
|
||||||
|
temp = CircularShift(5, A) + (B ^ C ^ D) + E + auiW[i] + sm_K160[3];
|
||||||
|
E = D;
|
||||||
|
D = C;
|
||||||
|
C = CircularShift(30, B);
|
||||||
|
B = A;
|
||||||
|
A = temp;
|
||||||
|
}
|
||||||
|
m_auiBuf[0] += A;
|
||||||
|
m_auiBuf[1] += B;
|
||||||
|
m_auiBuf[2] += C;
|
||||||
|
m_auiBuf[3] += D;
|
||||||
|
m_auiBuf[4] += E;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SHA256:
|
||||||
|
{
|
||||||
|
//Expansion of m_aucIn
|
||||||
|
unsigned char* pucIn = m_aucIn;
|
||||||
|
unsigned int auiW[64];
|
||||||
|
int i;
|
||||||
|
for(i=0; i<16; i++,pucIn+=4)
|
||||||
|
Bytes2Word(pucIn, auiW[i]);
|
||||||
|
for(i=16; i<64; i++)
|
||||||
|
auiW[i] = sig1(auiW[i-2]) + auiW[i-7] + sig0(auiW[i-15]) + auiW[i-16];
|
||||||
|
//OR
|
||||||
|
//for(i=0; i<48; i++)
|
||||||
|
// auiW[i+16] = sig1(auiW[i+14]) + auiW[i+9] + sig0(auiW[i+1]) + auiW[i];
|
||||||
|
unsigned int a, b, c, d, e, f, g, h, t;
|
||||||
|
a = m_auiBuf[0];
|
||||||
|
b = m_auiBuf[1];
|
||||||
|
c = m_auiBuf[2];
|
||||||
|
d = m_auiBuf[3];
|
||||||
|
e = m_auiBuf[4];
|
||||||
|
f = m_auiBuf[5];
|
||||||
|
g = m_auiBuf[6];
|
||||||
|
h = m_auiBuf[7];
|
||||||
|
t = h + SIG1(e) + CH(e, f, g) + sm_K256[0] + auiW[0]; h = t + SIG0(a) + MAJ(a, b, c); d += t;
|
||||||
|
t = g + SIG1(d) + CH(d, e, f) + sm_K256[1] + auiW[1]; g = t + SIG0(h) + MAJ(h, a, b); c += t;
|
||||||
|
t = f + SIG1(c) + CH(c, d, e) + sm_K256[2] + auiW[2]; f = t + SIG0(g) + MAJ(g, h, a); b += t;
|
||||||
|
t = e + SIG1(b) + CH(b, c, d) + sm_K256[3] + auiW[3]; e = t + SIG0(f) + MAJ(f, g, h); a += t;
|
||||||
|
t = d + SIG1(a) + CH(a, b, c) + sm_K256[4] + auiW[4]; d = t + SIG0(e) + MAJ(e, f, g); h += t;
|
||||||
|
t = c + SIG1(h) + CH(h, a, b) + sm_K256[5] + auiW[5]; c = t + SIG0(d) + MAJ(d, e, f); g += t;
|
||||||
|
t = b + SIG1(g) + CH(g, h, a) + sm_K256[6] + auiW[6]; b = t + SIG0(c) + MAJ(c, d, e); f += t;
|
||||||
|
t = a + SIG1(f) + CH(f, g, h) + sm_K256[7] + auiW[7]; a = t + SIG0(b) + MAJ(b, c, d); e += t;
|
||||||
|
//
|
||||||
|
t = h + SIG1(e) + CH(e, f, g) + sm_K256[8] + auiW[8]; h = t + SIG0(a) + MAJ(a, b, c); d += t;
|
||||||
|
t = g + SIG1(d) + CH(d, e, f) + sm_K256[9] + auiW[9]; g = t + SIG0(h) + MAJ(h, a, b); c += t;
|
||||||
|
t = f + SIG1(c) + CH(c, d, e) + sm_K256[10] + auiW[10]; f = t + SIG0(g) + MAJ(g, h, a); b += t;
|
||||||
|
t = e + SIG1(b) + CH(b, c, d) + sm_K256[11] + auiW[11]; e = t + SIG0(f) + MAJ(f, g, h); a += t;
|
||||||
|
t = d + SIG1(a) + CH(a, b, c) + sm_K256[12] + auiW[12]; d = t + SIG0(e) + MAJ(e, f, g); h += t;
|
||||||
|
t = c + SIG1(h) + CH(h, a, b) + sm_K256[13] + auiW[13]; c = t + SIG0(d) + MAJ(d, e, f); g += t;
|
||||||
|
t = b + SIG1(g) + CH(g, h, a) + sm_K256[14] + auiW[14]; b = t + SIG0(c) + MAJ(c, d, e); f += t;
|
||||||
|
t = a + SIG1(f) + CH(f, g, h) + sm_K256[15] + auiW[15]; a = t + SIG0(b) + MAJ(b, c, d); e += t;
|
||||||
|
//
|
||||||
|
t = h + SIG1(e) + CH(e, f, g) + sm_K256[16] + auiW[16]; h = t + SIG0(a) + MAJ(a, b, c); d += t;
|
||||||
|
t = g + SIG1(d) + CH(d, e, f) + sm_K256[17] + auiW[17]; g = t + SIG0(h) + MAJ(h, a, b); c += t;
|
||||||
|
t = f + SIG1(c) + CH(c, d, e) + sm_K256[18] + auiW[18]; f = t + SIG0(g) + MAJ(g, h, a); b += t;
|
||||||
|
t = e + SIG1(b) + CH(b, c, d) + sm_K256[19] + auiW[19]; e = t + SIG0(f) + MAJ(f, g, h); a += t;
|
||||||
|
t = d + SIG1(a) + CH(a, b, c) + sm_K256[20] + auiW[20]; d = t + SIG0(e) + MAJ(e, f, g); h += t;
|
||||||
|
t = c + SIG1(h) + CH(h, a, b) + sm_K256[21] + auiW[21]; c = t + SIG0(d) + MAJ(d, e, f); g += t;
|
||||||
|
t = b + SIG1(g) + CH(g, h, a) + sm_K256[22] + auiW[22]; b = t + SIG0(c) + MAJ(c, d, e); f += t;
|
||||||
|
t = a + SIG1(f) + CH(f, g, h) + sm_K256[23] + auiW[23]; a = t + SIG0(b) + MAJ(b, c, d); e += t;
|
||||||
|
//
|
||||||
|
t = h + SIG1(e) + CH(e, f, g) + sm_K256[24] + auiW[24]; h = t + SIG0(a) + MAJ(a, b, c); d += t;
|
||||||
|
t = g + SIG1(d) + CH(d, e, f) + sm_K256[25] + auiW[25]; g = t + SIG0(h) + MAJ(h, a, b); c += t;
|
||||||
|
t = f + SIG1(c) + CH(c, d, e) + sm_K256[26] + auiW[26]; f = t + SIG0(g) + MAJ(g, h, a); b += t;
|
||||||
|
t = e + SIG1(b) + CH(b, c, d) + sm_K256[27] + auiW[27]; e = t + SIG0(f) + MAJ(f, g, h); a += t;
|
||||||
|
t = d + SIG1(a) + CH(a, b, c) + sm_K256[28] + auiW[28]; d = t + SIG0(e) + MAJ(e, f, g); h += t;
|
||||||
|
t = c + SIG1(h) + CH(h, a, b) + sm_K256[29] + auiW[29]; c = t + SIG0(d) + MAJ(d, e, f); g += t;
|
||||||
|
t = b + SIG1(g) + CH(g, h, a) + sm_K256[30] + auiW[30]; b = t + SIG0(c) + MAJ(c, d, e); f += t;
|
||||||
|
t = a + SIG1(f) + CH(f, g, h) + sm_K256[31] + auiW[31]; a = t + SIG0(b) + MAJ(b, c, d); e += t;
|
||||||
|
//
|
||||||
|
t = h + SIG1(e) + CH(e, f, g) + sm_K256[32] + auiW[32]; h = t + SIG0(a) + MAJ(a, b, c); d += t;
|
||||||
|
t = g + SIG1(d) + CH(d, e, f) + sm_K256[33] + auiW[33]; g = t + SIG0(h) + MAJ(h, a, b); c += t;
|
||||||
|
t = f + SIG1(c) + CH(c, d, e) + sm_K256[34] + auiW[34]; f = t + SIG0(g) + MAJ(g, h, a); b += t;
|
||||||
|
t = e + SIG1(b) + CH(b, c, d) + sm_K256[35] + auiW[35]; e = t + SIG0(f) + MAJ(f, g, h); a += t;
|
||||||
|
t = d + SIG1(a) + CH(a, b, c) + sm_K256[36] + auiW[36]; d = t + SIG0(e) + MAJ(e, f, g); h += t;
|
||||||
|
t = c + SIG1(h) + CH(h, a, b) + sm_K256[37] + auiW[37]; c = t + SIG0(d) + MAJ(d, e, f); g += t;
|
||||||
|
t = b + SIG1(g) + CH(g, h, a) + sm_K256[38] + auiW[38]; b = t + SIG0(c) + MAJ(c, d, e); f += t;
|
||||||
|
t = a + SIG1(f) + CH(f, g, h) + sm_K256[39] + auiW[39]; a = t + SIG0(b) + MAJ(b, c, d); e += t;
|
||||||
|
//
|
||||||
|
t = h + SIG1(e) + CH(e, f, g) + sm_K256[40] + auiW[40]; h = t + SIG0(a) + MAJ(a, b, c); d += t;
|
||||||
|
t = g + SIG1(d) + CH(d, e, f) + sm_K256[41] + auiW[41]; g = t + SIG0(h) + MAJ(h, a, b); c += t;
|
||||||
|
t = f + SIG1(c) + CH(c, d, e) + sm_K256[42] + auiW[42]; f = t + SIG0(g) + MAJ(g, h, a); b += t;
|
||||||
|
t = e + SIG1(b) + CH(b, c, d) + sm_K256[43] + auiW[43]; e = t + SIG0(f) + MAJ(f, g, h); a += t;
|
||||||
|
t = d + SIG1(a) + CH(a, b, c) + sm_K256[44] + auiW[44]; d = t + SIG0(e) + MAJ(e, f, g); h += t;
|
||||||
|
t = c + SIG1(h) + CH(h, a, b) + sm_K256[45] + auiW[45]; c = t + SIG0(d) + MAJ(d, e, f); g += t;
|
||||||
|
t = b + SIG1(g) + CH(g, h, a) + sm_K256[46] + auiW[46]; b = t + SIG0(c) + MAJ(c, d, e); f += t;
|
||||||
|
t = a + SIG1(f) + CH(f, g, h) + sm_K256[47] + auiW[47]; a = t + SIG0(b) + MAJ(b, c, d); e += t;
|
||||||
|
//
|
||||||
|
t = h + SIG1(e) + CH(e, f, g) + sm_K256[48] + auiW[48]; h = t + SIG0(a) + MAJ(a, b, c); d += t;
|
||||||
|
t = g + SIG1(d) + CH(d, e, f) + sm_K256[49] + auiW[49]; g = t + SIG0(h) + MAJ(h, a, b); c += t;
|
||||||
|
t = f + SIG1(c) + CH(c, d, e) + sm_K256[50] + auiW[50]; f = t + SIG0(g) + MAJ(g, h, a); b += t;
|
||||||
|
t = e + SIG1(b) + CH(b, c, d) + sm_K256[51] + auiW[51]; e = t + SIG0(f) + MAJ(f, g, h); a += t;
|
||||||
|
t = d + SIG1(a) + CH(a, b, c) + sm_K256[52] + auiW[52]; d = t + SIG0(e) + MAJ(e, f, g); h += t;
|
||||||
|
t = c + SIG1(h) + CH(h, a, b) + sm_K256[53] + auiW[53]; c = t + SIG0(d) + MAJ(d, e, f); g += t;
|
||||||
|
t = b + SIG1(g) + CH(g, h, a) + sm_K256[54] + auiW[54]; b = t + SIG0(c) + MAJ(c, d, e); f += t;
|
||||||
|
t = a + SIG1(f) + CH(f, g, h) + sm_K256[55] + auiW[55]; a = t + SIG0(b) + MAJ(b, c, d); e += t;
|
||||||
|
//
|
||||||
|
t = h + SIG1(e) + CH(e, f, g) + sm_K256[56] + auiW[56]; h = t + SIG0(a) + MAJ(a, b, c); d += t;
|
||||||
|
t = g + SIG1(d) + CH(d, e, f) + sm_K256[57] + auiW[57]; g = t + SIG0(h) + MAJ(h, a, b); c += t;
|
||||||
|
t = f + SIG1(c) + CH(c, d, e) + sm_K256[58] + auiW[58]; f = t + SIG0(g) + MAJ(g, h, a); b += t;
|
||||||
|
t = e + SIG1(b) + CH(b, c, d) + sm_K256[59] + auiW[59]; e = t + SIG0(f) + MAJ(f, g, h); a += t;
|
||||||
|
t = d + SIG1(a) + CH(a, b, c) + sm_K256[60] + auiW[60]; d = t + SIG0(e) + MAJ(e, f, g); h += t;
|
||||||
|
t = c + SIG1(h) + CH(h, a, b) + sm_K256[61] + auiW[61]; c = t + SIG0(d) + MAJ(d, e, f); g += t;
|
||||||
|
t = b + SIG1(g) + CH(g, h, a) + sm_K256[62] + auiW[62]; b = t + SIG0(c) + MAJ(c, d, e); f += t;
|
||||||
|
t = a + SIG1(f) + CH(f, g, h) + sm_K256[63] + auiW[63]; a = t + SIG0(b) + MAJ(b, c, d); e += t;
|
||||||
|
//
|
||||||
|
//OR
|
||||||
|
/*
|
||||||
|
unsigned int a, b, c, d, e, f, g, h, t1, t2;
|
||||||
|
a = m_auiBuf[0];
|
||||||
|
b = m_auiBuf[1];
|
||||||
|
c = m_auiBuf[2];
|
||||||
|
d = m_auiBuf[3];
|
||||||
|
e = m_auiBuf[4];
|
||||||
|
f = m_auiBuf[5];
|
||||||
|
g = m_auiBuf[6];
|
||||||
|
h = m_auiBuf[7];
|
||||||
|
//
|
||||||
|
for(i=0; i<64; i++)
|
||||||
|
{
|
||||||
|
t1 = h + SIG1(e) + CH(e, f, g) + sm_K256[i] + auiW[i];
|
||||||
|
t2 = SIG0(a) + MAJ(a, b, c);
|
||||||
|
h = g;
|
||||||
|
g = f;
|
||||||
|
f = e;
|
||||||
|
e = d+t1;
|
||||||
|
d = c;
|
||||||
|
c = b;
|
||||||
|
b = a;
|
||||||
|
a = t1 + t2;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
m_auiBuf[0] += a;
|
||||||
|
m_auiBuf[1] += b;
|
||||||
|
m_auiBuf[2] += c;
|
||||||
|
m_auiBuf[3] += d;
|
||||||
|
m_auiBuf[4] += e;
|
||||||
|
m_auiBuf[5] += f;
|
||||||
|
m_auiBuf[6] += g;
|
||||||
|
m_auiBuf[7] += h;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SHA384:
|
||||||
|
case SHA512:
|
||||||
|
{
|
||||||
|
//Expansion of m_aucIn
|
||||||
|
unsigned char* pucIn = m_aucIn;
|
||||||
|
SUI64 aoui64W[80];
|
||||||
|
int i;
|
||||||
|
for(i=0; i<16; i++,pucIn+=8)
|
||||||
|
Bytes2Word(pucIn, aoui64W[i]);
|
||||||
|
for(i=16; i<80; i++)
|
||||||
|
aoui64W[i] = sig1(aoui64W[i-2]) + aoui64W[i-7] + sig0(aoui64W[i-15]) + aoui64W[i-16];
|
||||||
|
SUI64 a, b, c, d, e, f, g, h, t;
|
||||||
|
a = m_aoui64Buf[0];
|
||||||
|
b = m_aoui64Buf[1];
|
||||||
|
c = m_aoui64Buf[2];
|
||||||
|
d = m_aoui64Buf[3];
|
||||||
|
e = m_aoui64Buf[4];
|
||||||
|
f = m_aoui64Buf[5];
|
||||||
|
g = m_aoui64Buf[6];
|
||||||
|
h = m_aoui64Buf[7];
|
||||||
|
t = h + SIG1(e) + CH(e, f, g) + sm_K512[0] + aoui64W[0]; h = t + SIG0(a) + MAJ(a, b, c); d += t;
|
||||||
|
t = g + SIG1(d) + CH(d, e, f) + sm_K512[1] + aoui64W[1]; g = t + SIG0(h) + MAJ(h, a, b); c += t;
|
||||||
|
t = f + SIG1(c) + CH(c, d, e) + sm_K512[2] + aoui64W[2]; f = t + SIG0(g) + MAJ(g, h, a); b += t;
|
||||||
|
t = e + SIG1(b) + CH(b, c, d) + sm_K512[3] + aoui64W[3]; e = t + SIG0(f) + MAJ(f, g, h); a += t;
|
||||||
|
t = d + SIG1(a) + CH(a, b, c) + sm_K512[4] + aoui64W[4]; d = t + SIG0(e) + MAJ(e, f, g); h += t;
|
||||||
|
t = c + SIG1(h) + CH(h, a, b) + sm_K512[5] + aoui64W[5]; c = t + SIG0(d) + MAJ(d, e, f); g += t;
|
||||||
|
t = b + SIG1(g) + CH(g, h, a) + sm_K512[6] + aoui64W[6]; b = t + SIG0(c) + MAJ(c, d, e); f += t;
|
||||||
|
t = a + SIG1(f) + CH(f, g, h) + sm_K512[7] + aoui64W[7]; a = t + SIG0(b) + MAJ(b, c, d); e += t;
|
||||||
|
//
|
||||||
|
t = h + SIG1(e) + CH(e, f, g) + sm_K512[8] + aoui64W[8]; h = t + SIG0(a) + MAJ(a, b, c); d += t;
|
||||||
|
t = g + SIG1(d) + CH(d, e, f) + sm_K512[9] + aoui64W[9]; g = t + SIG0(h) + MAJ(h, a, b); c += t;
|
||||||
|
t = f + SIG1(c) + CH(c, d, e) + sm_K512[10] + aoui64W[10]; f = t + SIG0(g) + MAJ(g, h, a); b += t;
|
||||||
|
t = e + SIG1(b) + CH(b, c, d) + sm_K512[11] + aoui64W[11]; e = t + SIG0(f) + MAJ(f, g, h); a += t;
|
||||||
|
t = d + SIG1(a) + CH(a, b, c) + sm_K512[12] + aoui64W[12]; d = t + SIG0(e) + MAJ(e, f, g); h += t;
|
||||||
|
t = c + SIG1(h) + CH(h, a, b) + sm_K512[13] + aoui64W[13]; c = t + SIG0(d) + MAJ(d, e, f); g += t;
|
||||||
|
t = b + SIG1(g) + CH(g, h, a) + sm_K512[14] + aoui64W[14]; b = t + SIG0(c) + MAJ(c, d, e); f += t;
|
||||||
|
t = a + SIG1(f) + CH(f, g, h) + sm_K512[15] + aoui64W[15]; a = t + SIG0(b) + MAJ(b, c, d); e += t;
|
||||||
|
//
|
||||||
|
t = h + SIG1(e) + CH(e, f, g) + sm_K512[16] + aoui64W[16]; h = t + SIG0(a) + MAJ(a, b, c); d += t;
|
||||||
|
t = g + SIG1(d) + CH(d, e, f) + sm_K512[17] + aoui64W[17]; g = t + SIG0(h) + MAJ(h, a, b); c += t;
|
||||||
|
t = f + SIG1(c) + CH(c, d, e) + sm_K512[18] + aoui64W[18]; f = t + SIG0(g) + MAJ(g, h, a); b += t;
|
||||||
|
t = e + SIG1(b) + CH(b, c, d) + sm_K512[19] + aoui64W[19]; e = t + SIG0(f) + MAJ(f, g, h); a += t;
|
||||||
|
t = d + SIG1(a) + CH(a, b, c) + sm_K512[20] + aoui64W[20]; d = t + SIG0(e) + MAJ(e, f, g); h += t;
|
||||||
|
t = c + SIG1(h) + CH(h, a, b) + sm_K512[21] + aoui64W[21]; c = t + SIG0(d) + MAJ(d, e, f); g += t;
|
||||||
|
t = b + SIG1(g) + CH(g, h, a) + sm_K512[22] + aoui64W[22]; b = t + SIG0(c) + MAJ(c, d, e); f += t;
|
||||||
|
t = a + SIG1(f) + CH(f, g, h) + sm_K512[23] + aoui64W[23]; a = t + SIG0(b) + MAJ(b, c, d); e += t;
|
||||||
|
//
|
||||||
|
t = h + SIG1(e) + CH(e, f, g) + sm_K512[24] + aoui64W[24]; h = t + SIG0(a) + MAJ(a, b, c); d += t;
|
||||||
|
t = g + SIG1(d) + CH(d, e, f) + sm_K512[25] + aoui64W[25]; g = t + SIG0(h) + MAJ(h, a, b); c += t;
|
||||||
|
t = f + SIG1(c) + CH(c, d, e) + sm_K512[26] + aoui64W[26]; f = t + SIG0(g) + MAJ(g, h, a); b += t;
|
||||||
|
t = e + SIG1(b) + CH(b, c, d) + sm_K512[27] + aoui64W[27]; e = t + SIG0(f) + MAJ(f, g, h); a += t;
|
||||||
|
t = d + SIG1(a) + CH(a, b, c) + sm_K512[28] + aoui64W[28]; d = t + SIG0(e) + MAJ(e, f, g); h += t;
|
||||||
|
t = c + SIG1(h) + CH(h, a, b) + sm_K512[29] + aoui64W[29]; c = t + SIG0(d) + MAJ(d, e, f); g += t;
|
||||||
|
t = b + SIG1(g) + CH(g, h, a) + sm_K512[30] + aoui64W[30]; b = t + SIG0(c) + MAJ(c, d, e); f += t;
|
||||||
|
t = a + SIG1(f) + CH(f, g, h) + sm_K512[31] + aoui64W[31]; a = t + SIG0(b) + MAJ(b, c, d); e += t;
|
||||||
|
//
|
||||||
|
t = h + SIG1(e) + CH(e, f, g) + sm_K512[32] + aoui64W[32]; h = t + SIG0(a) + MAJ(a, b, c); d += t;
|
||||||
|
t = g + SIG1(d) + CH(d, e, f) + sm_K512[33] + aoui64W[33]; g = t + SIG0(h) + MAJ(h, a, b); c += t;
|
||||||
|
t = f + SIG1(c) + CH(c, d, e) + sm_K512[34] + aoui64W[34]; f = t + SIG0(g) + MAJ(g, h, a); b += t;
|
||||||
|
t = e + SIG1(b) + CH(b, c, d) + sm_K512[35] + aoui64W[35]; e = t + SIG0(f) + MAJ(f, g, h); a += t;
|
||||||
|
t = d + SIG1(a) + CH(a, b, c) + sm_K512[36] + aoui64W[36]; d = t + SIG0(e) + MAJ(e, f, g); h += t;
|
||||||
|
t = c + SIG1(h) + CH(h, a, b) + sm_K512[37] + aoui64W[37]; c = t + SIG0(d) + MAJ(d, e, f); g += t;
|
||||||
|
t = b + SIG1(g) + CH(g, h, a) + sm_K512[38] + aoui64W[38]; b = t + SIG0(c) + MAJ(c, d, e); f += t;
|
||||||
|
t = a + SIG1(f) + CH(f, g, h) + sm_K512[39] + aoui64W[39]; a = t + SIG0(b) + MAJ(b, c, d); e += t;
|
||||||
|
//
|
||||||
|
t = h + SIG1(e) + CH(e, f, g) + sm_K512[40] + aoui64W[40]; h = t + SIG0(a) + MAJ(a, b, c); d += t;
|
||||||
|
t = g + SIG1(d) + CH(d, e, f) + sm_K512[41] + aoui64W[41]; g = t + SIG0(h) + MAJ(h, a, b); c += t;
|
||||||
|
t = f + SIG1(c) + CH(c, d, e) + sm_K512[42] + aoui64W[42]; f = t + SIG0(g) + MAJ(g, h, a); b += t;
|
||||||
|
t = e + SIG1(b) + CH(b, c, d) + sm_K512[43] + aoui64W[43]; e = t + SIG0(f) + MAJ(f, g, h); a += t;
|
||||||
|
t = d + SIG1(a) + CH(a, b, c) + sm_K512[44] + aoui64W[44]; d = t + SIG0(e) + MAJ(e, f, g); h += t;
|
||||||
|
t = c + SIG1(h) + CH(h, a, b) + sm_K512[45] + aoui64W[45]; c = t + SIG0(d) + MAJ(d, e, f); g += t;
|
||||||
|
t = b + SIG1(g) + CH(g, h, a) + sm_K512[46] + aoui64W[46]; b = t + SIG0(c) + MAJ(c, d, e); f += t;
|
||||||
|
t = a + SIG1(f) + CH(f, g, h) + sm_K512[47] + aoui64W[47]; a = t + SIG0(b) + MAJ(b, c, d); e += t;
|
||||||
|
//
|
||||||
|
t = h + SIG1(e) + CH(e, f, g) + sm_K512[48] + aoui64W[48]; h = t + SIG0(a) + MAJ(a, b, c); d += t;
|
||||||
|
t = g + SIG1(d) + CH(d, e, f) + sm_K512[49] + aoui64W[49]; g = t + SIG0(h) + MAJ(h, a, b); c += t;
|
||||||
|
t = f + SIG1(c) + CH(c, d, e) + sm_K512[50] + aoui64W[50]; f = t + SIG0(g) + MAJ(g, h, a); b += t;
|
||||||
|
t = e + SIG1(b) + CH(b, c, d) + sm_K512[51] + aoui64W[51]; e = t + SIG0(f) + MAJ(f, g, h); a += t;
|
||||||
|
t = d + SIG1(a) + CH(a, b, c) + sm_K512[52] + aoui64W[52]; d = t + SIG0(e) + MAJ(e, f, g); h += t;
|
||||||
|
t = c + SIG1(h) + CH(h, a, b) + sm_K512[53] + aoui64W[53]; c = t + SIG0(d) + MAJ(d, e, f); g += t;
|
||||||
|
t = b + SIG1(g) + CH(g, h, a) + sm_K512[54] + aoui64W[54]; b = t + SIG0(c) + MAJ(c, d, e); f += t;
|
||||||
|
t = a + SIG1(f) + CH(f, g, h) + sm_K512[55] + aoui64W[55]; a = t + SIG0(b) + MAJ(b, c, d); e += t;
|
||||||
|
//
|
||||||
|
t = h + SIG1(e) + CH(e, f, g) + sm_K512[56] + aoui64W[56]; h = t + SIG0(a) + MAJ(a, b, c); d += t;
|
||||||
|
t = g + SIG1(d) + CH(d, e, f) + sm_K512[57] + aoui64W[57]; g = t + SIG0(h) + MAJ(h, a, b); c += t;
|
||||||
|
t = f + SIG1(c) + CH(c, d, e) + sm_K512[58] + aoui64W[58]; f = t + SIG0(g) + MAJ(g, h, a); b += t;
|
||||||
|
t = e + SIG1(b) + CH(b, c, d) + sm_K512[59] + aoui64W[59]; e = t + SIG0(f) + MAJ(f, g, h); a += t;
|
||||||
|
t = d + SIG1(a) + CH(a, b, c) + sm_K512[60] + aoui64W[60]; d = t + SIG0(e) + MAJ(e, f, g); h += t;
|
||||||
|
t = c + SIG1(h) + CH(h, a, b) + sm_K512[61] + aoui64W[61]; c = t + SIG0(d) + MAJ(d, e, f); g += t;
|
||||||
|
t = b + SIG1(g) + CH(g, h, a) + sm_K512[62] + aoui64W[62]; b = t + SIG0(c) + MAJ(c, d, e); f += t;
|
||||||
|
t = a + SIG1(f) + CH(f, g, h) + sm_K512[63] + aoui64W[63]; a = t + SIG0(b) + MAJ(b, c, d); e += t;
|
||||||
|
//
|
||||||
|
t = h + SIG1(e) + CH(e, f, g) + sm_K512[64] + aoui64W[64]; h = t + SIG0(a) + MAJ(a, b, c); d += t;
|
||||||
|
t = g + SIG1(d) + CH(d, e, f) + sm_K512[65] + aoui64W[65]; g = t + SIG0(h) + MAJ(h, a, b); c += t;
|
||||||
|
t = f + SIG1(c) + CH(c, d, e) + sm_K512[66] + aoui64W[66]; f = t + SIG0(g) + MAJ(g, h, a); b += t;
|
||||||
|
t = e + SIG1(b) + CH(b, c, d) + sm_K512[67] + aoui64W[67]; e = t + SIG0(f) + MAJ(f, g, h); a += t;
|
||||||
|
t = d + SIG1(a) + CH(a, b, c) + sm_K512[68] + aoui64W[68]; d = t + SIG0(e) + MAJ(e, f, g); h += t;
|
||||||
|
t = c + SIG1(h) + CH(h, a, b) + sm_K512[69] + aoui64W[69]; c = t + SIG0(d) + MAJ(d, e, f); g += t;
|
||||||
|
t = b + SIG1(g) + CH(g, h, a) + sm_K512[70] + aoui64W[70]; b = t + SIG0(c) + MAJ(c, d, e); f += t;
|
||||||
|
t = a + SIG1(f) + CH(f, g, h) + sm_K512[71] + aoui64W[71]; a = t + SIG0(b) + MAJ(b, c, d); e += t;
|
||||||
|
//
|
||||||
|
t = h + SIG1(e) + CH(e, f, g) + sm_K512[72] + aoui64W[72]; h = t + SIG0(a) + MAJ(a, b, c); d += t;
|
||||||
|
t = g + SIG1(d) + CH(d, e, f) + sm_K512[73] + aoui64W[73]; g = t + SIG0(h) + MAJ(h, a, b); c += t;
|
||||||
|
t = f + SIG1(c) + CH(c, d, e) + sm_K512[74] + aoui64W[74]; f = t + SIG0(g) + MAJ(g, h, a); b += t;
|
||||||
|
t = e + SIG1(b) + CH(b, c, d) + sm_K512[75] + aoui64W[75]; e = t + SIG0(f) + MAJ(f, g, h); a += t;
|
||||||
|
t = d + SIG1(a) + CH(a, b, c) + sm_K512[76] + aoui64W[76]; d = t + SIG0(e) + MAJ(e, f, g); h += t;
|
||||||
|
t = c + SIG1(h) + CH(h, a, b) + sm_K512[77] + aoui64W[77]; c = t + SIG0(d) + MAJ(d, e, f); g += t;
|
||||||
|
t = b + SIG1(g) + CH(g, h, a) + sm_K512[78] + aoui64W[78]; b = t + SIG0(c) + MAJ(c, d, e); f += t;
|
||||||
|
t = a + SIG1(f) + CH(f, g, h) + sm_K512[79] + aoui64W[79]; a = t + SIG0(b) + MAJ(b, c, d); e += t;
|
||||||
|
//
|
||||||
|
m_aoui64Buf[0] += a;
|
||||||
|
m_aoui64Buf[1] += b;
|
||||||
|
m_aoui64Buf[2] += c;
|
||||||
|
m_aoui64Buf[3] += d;
|
||||||
|
m_aoui64Buf[4] += e;
|
||||||
|
m_aoui64Buf[5] += f;
|
||||||
|
m_aoui64Buf[6] += g;
|
||||||
|
m_aoui64Buf[7] += h;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
379
3rdparty/MultiEmulator/src/SHA.h
vendored
Normal file
379
3rdparty/MultiEmulator/src/SHA.h
vendored
Normal file
@@ -0,0 +1,379 @@
|
|||||||
|
//SHA.h
|
||||||
|
|
||||||
|
#ifndef __SHA_H__
|
||||||
|
#define __SHA_H__
|
||||||
|
|
||||||
|
#include "MessageDigest.h"
|
||||||
|
|
||||||
|
//Typical DISCLAIMER:
|
||||||
|
//The code in this project is Copyright (C) 2003 by George Anescu. You have the right to
|
||||||
|
//use and distribute the code in any way you see fit as long as this paragraph is included
|
||||||
|
//with the distribution. No warranties or claims are made as to the validity of the
|
||||||
|
//information and code contained herein, so use it at your own risk.
|
||||||
|
|
||||||
|
//Structure for representing an Unsigned Integer on 64 bits
|
||||||
|
struct SUI64
|
||||||
|
{
|
||||||
|
//Data
|
||||||
|
unsigned int m_uiLeft;
|
||||||
|
unsigned int m_uiRight;
|
||||||
|
|
||||||
|
//Operators
|
||||||
|
SUI64& operator++()
|
||||||
|
{
|
||||||
|
unsigned int uiTemp = m_uiRight;
|
||||||
|
m_uiRight++;
|
||||||
|
if(m_uiRight < uiTemp)
|
||||||
|
m_uiLeft++;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
SUI64& operator--()
|
||||||
|
{
|
||||||
|
unsigned int uiTemp = m_uiRight;
|
||||||
|
m_uiRight--;
|
||||||
|
if(m_uiRight > uiTemp)
|
||||||
|
m_uiLeft--;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
SUI64& operator+=(SUI64 const& roUI64)
|
||||||
|
{
|
||||||
|
m_uiRight += roUI64.m_uiRight;
|
||||||
|
if(m_uiRight < roUI64.m_uiRight)
|
||||||
|
m_uiLeft++;
|
||||||
|
m_uiLeft += roUI64.m_uiLeft;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
SUI64& operator|=(SUI64 const& roUI64)
|
||||||
|
{
|
||||||
|
m_uiRight |= roUI64.m_uiRight;
|
||||||
|
m_uiLeft |= roUI64.m_uiLeft;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
SUI64& operator&=(SUI64 const& roUI64)
|
||||||
|
{
|
||||||
|
m_uiRight &= roUI64.m_uiRight;
|
||||||
|
m_uiLeft &= roUI64.m_uiLeft;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
SUI64& operator^=(SUI64 const& roUI64)
|
||||||
|
{
|
||||||
|
m_uiRight ^= roUI64.m_uiRight;
|
||||||
|
m_uiLeft ^= roUI64.m_uiLeft;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
SUI64& operator<<=(unsigned int uiBits)
|
||||||
|
{
|
||||||
|
if(uiBits < 32)
|
||||||
|
{
|
||||||
|
(m_uiLeft <<= uiBits) |= (m_uiRight >> (32-uiBits));
|
||||||
|
m_uiRight <<= uiBits;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_uiLeft = m_uiRight << (uiBits-32);
|
||||||
|
m_uiRight = 0;
|
||||||
|
}
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
SUI64& operator>>=(unsigned int uiBits)
|
||||||
|
{
|
||||||
|
if(uiBits < 32)
|
||||||
|
{
|
||||||
|
(m_uiRight >>= uiBits) |= (m_uiLeft << (32-uiBits));
|
||||||
|
m_uiLeft >>= uiBits;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_uiRight = m_uiLeft >> (uiBits-32);
|
||||||
|
m_uiLeft = 0;
|
||||||
|
}
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator>(SUI64 const& roUI64) const
|
||||||
|
{
|
||||||
|
if(m_uiLeft == roUI64.m_uiLeft)
|
||||||
|
return m_uiRight > roUI64.m_uiRight;
|
||||||
|
else
|
||||||
|
return m_uiLeft > roUI64.m_uiLeft;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator<(SUI64 const& roUI64) const
|
||||||
|
{
|
||||||
|
if(m_uiLeft == roUI64.m_uiLeft)
|
||||||
|
return m_uiRight < roUI64.m_uiRight;
|
||||||
|
else
|
||||||
|
return m_uiLeft < roUI64.m_uiLeft;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
inline SUI64 operator+(SUI64 const& roUI64_1, SUI64 const& roUI64_2)
|
||||||
|
{
|
||||||
|
SUI64 temp = roUI64_1;
|
||||||
|
temp += roUI64_2;
|
||||||
|
return temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline SUI64 operator|(SUI64 const& roUI64_1, SUI64 const& roUI64_2)
|
||||||
|
{
|
||||||
|
SUI64 temp = roUI64_1;
|
||||||
|
temp |= roUI64_2;
|
||||||
|
return temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline SUI64 operator&(SUI64 const& roUI64_1, SUI64 const& roUI64_2)
|
||||||
|
{
|
||||||
|
SUI64 temp = roUI64_1;
|
||||||
|
temp &= roUI64_2;
|
||||||
|
return temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline SUI64 operator^(SUI64 const& roUI64_1, SUI64 const& roUI64_2)
|
||||||
|
{
|
||||||
|
SUI64 temp = roUI64_1;
|
||||||
|
temp ^= roUI64_2;
|
||||||
|
return temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline SUI64 operator<<(SUI64 const& roUI64, unsigned int uiBits)
|
||||||
|
{
|
||||||
|
SUI64 temp = roUI64;
|
||||||
|
temp <<= uiBits;
|
||||||
|
return temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline SUI64 operator>>(SUI64 const& roUI64, unsigned int uiBits)
|
||||||
|
{
|
||||||
|
SUI64 temp = roUI64;
|
||||||
|
temp >>= uiBits;
|
||||||
|
return temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool operator>(SUI64 const& roUI64_1, SUI64 const& roUI64_2)
|
||||||
|
{
|
||||||
|
return roUI64_1.operator>(roUI64_2);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool operator<(SUI64 const& roUI64_1, SUI64 const& roUI64_2)
|
||||||
|
{
|
||||||
|
return roUI64_1.operator<(roUI64_2);
|
||||||
|
}
|
||||||
|
|
||||||
|
//SHA Message Digest algorithm
|
||||||
|
//SHA160 TEST VALUES:
|
||||||
|
//1)"abc"
|
||||||
|
//"A9993E364706816ABA3E25717850C26C9CD0D89D"
|
||||||
|
//
|
||||||
|
//2)"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
|
||||||
|
//"84983E441C3BD26EBAAE4AA1F95129E5E54670F1"
|
||||||
|
//
|
||||||
|
//3)1,000,000 repetitions of "a".
|
||||||
|
//"34AA973CD4C4DAA4F61EEB2BDBAD27316534016F"
|
||||||
|
//
|
||||||
|
//SHA256 TEST VALUES:
|
||||||
|
//1)One-Block Message "abc"
|
||||||
|
//"ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"
|
||||||
|
//
|
||||||
|
//2)"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
|
||||||
|
//"248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1"
|
||||||
|
//
|
||||||
|
//3)Multi-Block Message "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"
|
||||||
|
//"CF5B16A778AF8380036CE59E7B0492370B249B11E8F07A51AFAC45037AFEE9D1"
|
||||||
|
//
|
||||||
|
//4)Long Message "a" 1,000,000 times
|
||||||
|
//"cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0"
|
||||||
|
//
|
||||||
|
//SHA384 TEST VALUES:
|
||||||
|
//1)One-Block Message "abc"
|
||||||
|
//"cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7"
|
||||||
|
//
|
||||||
|
//2)Multi-Block Message "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"
|
||||||
|
//"09330C33F71147E83D192FC782CD1B4753111B173B3B05D22FA08086E3B0F712FCC7C71A557E2DB966C3E9FA91746039"
|
||||||
|
//
|
||||||
|
//3)Long Message "a" 1,000,000 times
|
||||||
|
//"9d0e1809716474cb086e834e310a4a1ced149e9c00f248527972cec5704c2a5b07b8b3dc38ecc4ebae97ddd87f3d8985"
|
||||||
|
//
|
||||||
|
//SHA512 TEST VALUES:
|
||||||
|
//1)One-Block Message "abc"
|
||||||
|
//"ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a8
|
||||||
|
//36ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f"
|
||||||
|
//
|
||||||
|
//2)"abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"
|
||||||
|
//"8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018501d289e4900f7e4
|
||||||
|
//331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909"
|
||||||
|
//
|
||||||
|
//3)""
|
||||||
|
//"CF83E1357EEFB8BDF1542850D66D8007D620E4050B5715DC83F4A921D36CE9CE47D0D13C5D85F2B0
|
||||||
|
//FF8318D2877EEC2F63B931BD47417A81A538327AF927DA3E"
|
||||||
|
//
|
||||||
|
//4)Long Message "a" 1,000,000 times
|
||||||
|
//"E718483D0CE769644E2E42C7BC15B4638E1F98B13B2044285632A803AFA973EBDE0FF244877EA60A
|
||||||
|
//4CB0432CE577C31BEB009C5C2C49AA2E4EADB217AD8CC09B"
|
||||||
|
|
||||||
|
class CSHA : public IMessageDigest
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum { SHA160=0, SHA256=1, SHA384=2, SHA512=3 };
|
||||||
|
//CONSTRUCTOR
|
||||||
|
CSHA(int iMethod=SHA160);
|
||||||
|
//Update context to reflect the concatenation of another buffer of bytes.
|
||||||
|
void AddData(char const* pcData, int iDataLength);
|
||||||
|
//Final wrapup - pad to 64-byte boundary with the bit pattern
|
||||||
|
//1 0*(64-bit count of bits processed, MSB-first)
|
||||||
|
void FinalDigest(char* pcDigest);
|
||||||
|
//Reset current operation in order to prepare a new one
|
||||||
|
void Reset();
|
||||||
|
|
||||||
|
private:
|
||||||
|
//Transformation Function
|
||||||
|
void Transform();
|
||||||
|
//The Method
|
||||||
|
int m_iMethod;
|
||||||
|
enum { BLOCKSIZE2 = BLOCKSIZE<<1 };
|
||||||
|
//For 32 bits Integers
|
||||||
|
enum { SHA160LENGTH=5, SHA256LENGTH=8 };
|
||||||
|
//Context Variables
|
||||||
|
unsigned int m_auiBuf[SHA256LENGTH]; //Maximum for SHA256
|
||||||
|
unsigned int m_auiBits[2];
|
||||||
|
unsigned char m_aucIn[BLOCKSIZE2]; //128 bytes for SHA384, SHA512
|
||||||
|
//Internal auxiliary static functions
|
||||||
|
static unsigned int CircularShift(unsigned int uiBits, unsigned int uiWord);
|
||||||
|
static unsigned int CH(unsigned int x, unsigned int y, unsigned int z);
|
||||||
|
static unsigned int MAJ(unsigned int x, unsigned int y, unsigned int z);
|
||||||
|
static unsigned int SIG0(unsigned int x);
|
||||||
|
static unsigned int SIG1(unsigned int x);
|
||||||
|
static unsigned int sig0(unsigned int x);
|
||||||
|
static unsigned int sig1(unsigned int x);
|
||||||
|
static void Bytes2Word(unsigned char const* pcBytes, unsigned int& ruiWord);
|
||||||
|
static void Word2Bytes(unsigned int const& ruiWord, unsigned char* pcBytes);
|
||||||
|
static const unsigned int sm_K160[4];
|
||||||
|
static const unsigned int sm_H160[SHA160LENGTH];
|
||||||
|
static const unsigned int sm_K256[64];
|
||||||
|
static const unsigned int sm_H256[SHA256LENGTH];
|
||||||
|
|
||||||
|
//For 64 bits Integers
|
||||||
|
enum { SHA384LENGTH=6, SHA512LENGTH=8 };
|
||||||
|
//Context Variables
|
||||||
|
SUI64 m_aoui64Buf[SHA512LENGTH]; //Maximum for SHA512
|
||||||
|
SUI64 m_aoui64Bits[2];
|
||||||
|
//Internal auxiliary static functions
|
||||||
|
static SUI64 CircularShift(unsigned int uiBits, SUI64 const& roui64Word);
|
||||||
|
static SUI64 CH(SUI64 const& x, SUI64 const& y, SUI64 const& z);
|
||||||
|
static SUI64 MAJ(SUI64 const& x, SUI64 const& y, SUI64 const& z);
|
||||||
|
static SUI64 SIG0(SUI64 const& x);
|
||||||
|
static SUI64 SIG1(SUI64 const& x);
|
||||||
|
static SUI64 sig0(SUI64 const& x);
|
||||||
|
static SUI64 sig1(SUI64 const& x);
|
||||||
|
static void Bytes2Word(unsigned char const* pcBytes, SUI64& ruiWord);
|
||||||
|
static void Word2Bytes(SUI64 const& ruiWord, unsigned char* pcBytes);
|
||||||
|
static const SUI64 sm_H384[SHA512LENGTH]; //Dim is as 512
|
||||||
|
static const SUI64 sm_K512[80];
|
||||||
|
static const SUI64 sm_H512[SHA512LENGTH];
|
||||||
|
};
|
||||||
|
|
||||||
|
inline unsigned int CSHA::CircularShift(unsigned int uiBits, unsigned int uiWord)
|
||||||
|
{
|
||||||
|
return (uiWord << uiBits) | (uiWord >> (32-uiBits));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline unsigned int CSHA::CH(unsigned int x, unsigned int y, unsigned int z)
|
||||||
|
{
|
||||||
|
return ((x&(y^z))^z);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline unsigned int CSHA::MAJ(unsigned int x, unsigned int y, unsigned int z)
|
||||||
|
{
|
||||||
|
return (((x|y)&z)|(x&y));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline unsigned int CSHA::SIG0(unsigned int x)
|
||||||
|
{
|
||||||
|
return ((x >> 2)|(x << 30)) ^ ((x >> 13)|(x << 19)) ^ ((x >> 22)|(x << 10));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline unsigned int CSHA::SIG1(unsigned int x)
|
||||||
|
{
|
||||||
|
return ((x >> 6)|(x << 26)) ^ ((x >> 11)|(x << 21)) ^ ((x >> 25)|(x << 7));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline unsigned int CSHA::sig0(unsigned int x)
|
||||||
|
{
|
||||||
|
return ((x >> 7)|(x << 25)) ^ ((x >> 18)|(x << 14)) ^ (x >> 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline unsigned int CSHA::sig1(unsigned int x)
|
||||||
|
{
|
||||||
|
return ((x >> 17)|(x << 15)) ^ ((x >> 19)|(x << 13)) ^ (x >> 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void CSHA::Bytes2Word(unsigned char const* pcBytes, unsigned int& ruiWord)
|
||||||
|
{
|
||||||
|
ruiWord = (unsigned int)*(pcBytes+3) | (unsigned int)(*(pcBytes+2)<<8) |
|
||||||
|
(unsigned int)(*(pcBytes+1)<<16) | (unsigned int)(*pcBytes<<24);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void CSHA::Word2Bytes(unsigned int const& ruiWord, unsigned char* pcBytes)
|
||||||
|
{
|
||||||
|
pcBytes += 3;
|
||||||
|
*pcBytes = ruiWord & 0xff;
|
||||||
|
*--pcBytes = (ruiWord>>8) & 0xff;
|
||||||
|
*--pcBytes = (ruiWord>>16) & 0xff;
|
||||||
|
*--pcBytes = (ruiWord>>24) & 0xff;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline SUI64 CSHA::CircularShift(unsigned int uiBits, SUI64 const& roui64Word)
|
||||||
|
{
|
||||||
|
return (roui64Word << uiBits) | (roui64Word >> (64-uiBits));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline SUI64 CSHA::CH(SUI64 const& x, SUI64 const& y, SUI64 const& z)
|
||||||
|
{
|
||||||
|
return ((x&(y^z))^z);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline SUI64 CSHA::MAJ(SUI64 const& x, SUI64 const& y, SUI64 const& z)
|
||||||
|
{
|
||||||
|
return (((x|y)&z)|(x&y));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline SUI64 CSHA::SIG0(SUI64 const& x)
|
||||||
|
{
|
||||||
|
return ((x >> 28)|(x << 36)) ^ ((x >> 34)|(x << 30)) ^ ((x >> 39)|(x << 25));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline SUI64 CSHA::SIG1(SUI64 const& x)
|
||||||
|
{
|
||||||
|
return ((x >> 14)|(x << 50)) ^ ((x >> 18)|(x << 46)) ^ ((x >> 41)|(x << 23));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline SUI64 CSHA::sig0(SUI64 const& x)
|
||||||
|
{
|
||||||
|
return ((x >> 1)|(x << 63)) ^ ((x >> 8)|(x << 56)) ^ (x >> 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline SUI64 CSHA::sig1(SUI64 const& x)
|
||||||
|
{
|
||||||
|
return ((x >> 19)|(x << 45)) ^ ((x >> 61)|(x << 3)) ^ (x >> 6);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void CSHA::Bytes2Word(unsigned char const* pcBytes, SUI64& ruiWord)
|
||||||
|
{
|
||||||
|
Bytes2Word(pcBytes+4, ruiWord.m_uiRight);
|
||||||
|
Bytes2Word(pcBytes, ruiWord.m_uiLeft);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void CSHA::Word2Bytes(SUI64 const& ruiWord, unsigned char* pcBytes)
|
||||||
|
{
|
||||||
|
Word2Bytes(ruiWord.m_uiRight, pcBytes+4);
|
||||||
|
Word2Bytes(ruiWord.m_uiLeft, pcBytes);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // __SHA_H__
|
||||||
13
3rdparty/MultiEmulator/src/Setti.cpp
vendored
Normal file
13
3rdparty/MultiEmulator/src/Setti.cpp
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#include "multi_emulator.h"
|
||||||
|
|
||||||
|
int GenerateSetti(void *pDest)
|
||||||
|
{
|
||||||
|
auto pTicket = (int *)pDest;
|
||||||
|
|
||||||
|
pTicket[0] = 0xD4CA7F7B;
|
||||||
|
pTicket[1] = 0xC7DB6023;
|
||||||
|
pTicket[2] = 0x6D6A2E1F;
|
||||||
|
pTicket[5] = 0xB4C43105;
|
||||||
|
|
||||||
|
return 768;
|
||||||
|
}
|
||||||
18
3rdparty/MultiEmulator/src/SteamEmu.cpp
vendored
Normal file
18
3rdparty/MultiEmulator/src/SteamEmu.cpp
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#include "multi_emulator.h"
|
||||||
|
int GenerateSteamEmu(void *pDest, int nSteamID)
|
||||||
|
{
|
||||||
|
auto pTicket = (int *)pDest;
|
||||||
|
|
||||||
|
pTicket[20] = -1; // +80, dproto/reunion wants this value to be -1, but if this value
|
||||||
|
// does not match -1, then instead of SteamID in [21] cell
|
||||||
|
// client IP address that xored with 0x25730981 number should
|
||||||
|
// be used. But dproto/reunion will just skip ticket validation
|
||||||
|
// in that case.
|
||||||
|
|
||||||
|
pTicket[21] = nSteamID; // +84, SteamId, low part. Actually, this is just system volume serial
|
||||||
|
// number, which comes from GetVolumeInformationA() function. If
|
||||||
|
// function failed (returned 0), then instead of volume serial number
|
||||||
|
// 777 number will be written to the ticket.
|
||||||
|
|
||||||
|
return 768;
|
||||||
|
}
|
||||||
12
3rdparty/MultiEmulator/src/StrUtils.cpp
vendored
Normal file
12
3rdparty/MultiEmulator/src/StrUtils.cpp
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#include "StrUtils.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
void CreateRandomString(char *pszDest, int nLength)
|
||||||
|
{
|
||||||
|
static const char c_szAlphaNum[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||||
|
|
||||||
|
for (int i = 0; i < nLength; ++i)
|
||||||
|
pszDest[i] = c_szAlphaNum[rand() % (sizeof(c_szAlphaNum) - 1)];
|
||||||
|
|
||||||
|
pszDest[nLength] = '\0';
|
||||||
|
}
|
||||||
3
3rdparty/MultiEmulator/src/StrUtils.h
vendored
Normal file
3
3rdparty/MultiEmulator/src/StrUtils.h
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
void CreateRandomString(char *pszDest, int nLength);
|
||||||
24
3rdparty/MultiEmulator/wscript
vendored
Normal file
24
3rdparty/MultiEmulator/wscript
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# encoding: utf-8
|
||||||
|
# mittorn, 2018
|
||||||
|
|
||||||
|
from waflib import Logs
|
||||||
|
import os
|
||||||
|
|
||||||
|
top = '.'
|
||||||
|
|
||||||
|
def options(opt):
|
||||||
|
return
|
||||||
|
|
||||||
|
def configure(conf):
|
||||||
|
return
|
||||||
|
|
||||||
|
def build(bld):
|
||||||
|
bld.stlib(
|
||||||
|
source = bld.path.ant_glob(['src/*.cpp']),
|
||||||
|
target = 'MultiEmulator',
|
||||||
|
features = 'cxx',
|
||||||
|
includes = ['include/', 'src/'],
|
||||||
|
export_includes = ['include/'],
|
||||||
|
subsystem = bld.env.MSVC_SUBSYSTEM
|
||||||
|
)
|
||||||
1
3rdparty/bzip2/bz_version.h
vendored
Normal file
1
3rdparty/bzip2/bz_version.h
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
#define BZ_VERSION "1.1.0-fwgs"
|
||||||
1
3rdparty/bzip2/bzip2
vendored
Submodule
1
3rdparty/bzip2/bzip2
vendored
Submodule
Submodule 3rdparty/bzip2/bzip2 added at 66c46b8c94
34
3rdparty/bzip2/wscript
vendored
Normal file
34
3rdparty/bzip2/wscript
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# encoding: utf-8
|
||||||
|
|
||||||
|
def options(opt):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def configure(conf):
|
||||||
|
conf.define('_GNU_SOURCE', 1)
|
||||||
|
conf.define('BZ_NO_STDIO', 1)
|
||||||
|
|
||||||
|
if conf.env.DEST_OS == 'win32':
|
||||||
|
conf.define('BZ_LCCWIN32', 1)
|
||||||
|
else:
|
||||||
|
conf.define('BZ_UNIX', 1)
|
||||||
|
|
||||||
|
def build(bld):
|
||||||
|
# bld(
|
||||||
|
# features = 'subst',
|
||||||
|
# source = 'bzip2/bz_version.h.in',
|
||||||
|
# target = 'bz_version.h',
|
||||||
|
# BZ_VERSION='1.1.0-fwgs'
|
||||||
|
# )
|
||||||
|
|
||||||
|
bz_sources = ['bzip2/blocksort.c', 'bzip2/huffman.c', 'bzip2/crctable.c', 'bzip2/randtable.c', 'bzip2/compress.c', 'bzip2/decompress.c', 'bzip2/bzlib.c']
|
||||||
|
|
||||||
|
bld.stlib(
|
||||||
|
source = bz_sources,
|
||||||
|
target = 'bzip2',
|
||||||
|
# use = 'bz_version.h',
|
||||||
|
features = 'c',
|
||||||
|
includes = ['.', 'bzip2/'],
|
||||||
|
subsystem = bld.env.MSVC_SUBSYSTEM,
|
||||||
|
export_includes = ['bzip2/']
|
||||||
|
)
|
||||||
29
3rdparty/extras/wscript
vendored
Normal file
29
3rdparty/extras/wscript
vendored
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# encoding: utf-8
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
def options(opt):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def configure(conf):
|
||||||
|
if not conf.path.find_dir('xash-extras'):
|
||||||
|
conf.fatal('Can\'t find xash-extras submodule.')
|
||||||
|
return
|
||||||
|
|
||||||
|
conf.load('zip')
|
||||||
|
|
||||||
|
def build(bld):
|
||||||
|
srcdir = bld.path.find_dir('xash-extras')
|
||||||
|
|
||||||
|
if bld.env.DEST_OS in ['android']:
|
||||||
|
install_path = bld.env.PREFIX
|
||||||
|
else:
|
||||||
|
install_path = os.path.join(bld.env.SHAREDIR, bld.env.GAMEDIR)
|
||||||
|
|
||||||
|
bld(features='zip',
|
||||||
|
name = 'extras.pk3',
|
||||||
|
files = srcdir.ant_glob('**/*'),
|
||||||
|
relative_to = srcdir,
|
||||||
|
compresslevel = 0,
|
||||||
|
install_path = install_path)
|
||||||
1
3rdparty/extras/xash-extras
vendored
Submodule
1
3rdparty/extras/xash-extras
vendored
Submodule
Submodule 3rdparty/extras/xash-extras added at f4ff263d42
2
3rdparty/gl-wes-v2
vendored
2
3rdparty/gl-wes-v2
vendored
Submodule 3rdparty/gl-wes-v2 updated: 7f567393d4...2d9b5afe10
2
3rdparty/gl4es/gl4es
vendored
2
3rdparty/gl4es/gl4es
vendored
Submodule 3rdparty/gl4es/gl4es updated: 5c28420a38...e39434a2b1
2
3rdparty/gl4es/wscript
vendored
2
3rdparty/gl4es/wscript
vendored
@@ -18,7 +18,7 @@ def build(bld):
|
|||||||
target = 'gl4es',
|
target = 'gl4es',
|
||||||
features = 'c',
|
features = 'c',
|
||||||
includes = ['gl4es/src', 'gl4es/src/gl', 'gl4es/src/glx', 'gl4es/include'],
|
includes = ['gl4es/src', 'gl4es/src/gl', 'gl4es/src/glx', 'gl4es/include'],
|
||||||
defines = ['NOX11', 'NO_GBM', 'NO_INIT_CONSTRUCTOR', 'DEFAULT_ES=2', 'NOEGL', 'EXTERNAL_GETPROCADDRESS=GL4ES_GetProcAddress', 'NO_LOADER', 'STATICLIB'],
|
defines = ['NOX11', 'NO_GBM', 'NO_INIT_CONSTRUCTOR', 'DEFAULT_ES=2', 'NOEGL', 'NO_LOADER', 'STATICLIB'],
|
||||||
cflags = ['-w', '-fvisibility=hidden', '-std=gnu99'],
|
cflags = ['-w', '-fvisibility=hidden', '-std=gnu99'],
|
||||||
subsystem = bld.env.MSVC_SUBSYSTEM,
|
subsystem = bld.env.MSVC_SUBSYSTEM,
|
||||||
export_includes = '.')
|
export_includes = '.')
|
||||||
|
|||||||
2
3rdparty/mainui
vendored
2
3rdparty/mainui
vendored
Submodule 3rdparty/mainui updated: 14c0922af7...b7edbaf2de
2
3rdparty/nanogl
vendored
2
3rdparty/nanogl
vendored
Submodule 3rdparty/nanogl updated: 5a22eab534...e75792de03
2
3rdparty/opus/opus
vendored
2
3rdparty/opus/opus
vendored
Submodule 3rdparty/opus/opus updated: 997fdf54e7...8cf872a186
2
3rdparty/vgui_support
vendored
2
3rdparty/vgui_support
vendored
Submodule 3rdparty/vgui_support updated: 63c134f188...7276993f3f
@@ -1,17 +1,17 @@
|
|||||||
# Bug-compatibility in Xash3D FWGS
|
# Bug-compatibility in Xash3D FWGS
|
||||||
|
|
||||||
Xash3D FWGS has special mode for games that rely on original engine bugs.
|
Xash3D FWGS has special mode for games that rely on original engine bugs. In this mode, we emulate the behaviour of selected functions that may help running mods relying on engine bugs, but enabling them by default may break majority of other games.
|
||||||
|
|
||||||
In this mode, we emulate the behaviour of selected functions that may help running mods relying on engine bugs, but enabling them by default may break majority of other games.
|
|
||||||
|
|
||||||
At this time, we only have implemented GoldSrc bug-compatibility. It can be enabled with `-bugcomp` command line switch.
|
At this time, we only have implemented GoldSrc bug-compatibility. It can be enabled with `-bugcomp` command line switch.
|
||||||
|
|
||||||
|
When `-bugcomp` is specified without argument, it enables everything. This behavior might be changed or removed in future versions.
|
||||||
|
|
||||||
|
When `-bugcomp` is specified with argument, it interpreted as flags separated with `+`. This way it's possible to combine multiple levels of bug-compatibility.
|
||||||
|
|
||||||
## GoldSrc bug-compatibility
|
## GoldSrc bug-compatibility
|
||||||
|
|
||||||
### Emulated bugs
|
| Flag | Description | Games that require this flag |
|
||||||
|
| ------- | ----------- | ---------------------------- |
|
||||||
* `pfnPEntityOfEntIndex` in GoldSrc returns NULL for last player due to incorrect player index comparison
|
| `peoei` | Reverts `pfnPEntityOfEntIndex` behavior to GoldSrc, where it returns NULL for last player due to incorrect player index comparison | * Counter-Strike: Condition Zero - Deleted Scenes |
|
||||||
|
| `gsmrf` | Rewrites message at the moment when Game DLL attempts to write an internal engine message, usually specific to GoldSrc protocol. Right now only supports `svc_spawnstaticsound`, more messages added by request. | * MetaMod/AMXModX based mods |
|
||||||
### Games and mods that require this
|
| `sp_attn_none` | Makes sounds with attenuation zero spatialized, i.e. have a stereo effect. | Possibly, every game that was made for GoldSrc. |
|
||||||
|
|
||||||
* Counter-Strike: Condition Zero - Deleted Scenes
|
|
||||||
|
|||||||
9
Documentation/cross-compiling-for-windows-with-wine.md
Normal file
9
Documentation/cross-compiling-for-windows-with-wine.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Cross-compiling for Windows with Wine
|
||||||
|
|
||||||
|
This can be useful to test engine in Wine without using virtual machines or dual-booting to Windows.
|
||||||
|
|
||||||
|
0. Clone and install https://github.com/mstorsjo/msvc-wine (you can skip CMake part)
|
||||||
|
1. Set environment variable MSVC_WINE_PATH to the path to installed MSVC toolchain
|
||||||
|
2. Pre-load wine: `wineserver -k; wineserver -p; wine64 wineboot`
|
||||||
|
3. Run `./waf configure -T <build-type> --enable-wine-msvc --sdl2=../SDL2_VC`. Configuration step will take more time than usual.
|
||||||
|
4. .. other typical steps to build from console ...
|
||||||
10
Documentation/debugging-using-minidumps.md
Normal file
10
Documentation/debugging-using-minidumps.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# Debugging your mod using minidump files (Windows only)
|
||||||
|
Minidump files is awesome instrument for debugging your mod after it's being released, or for catch specific crashes which are presented only in one specific configuration, but doesn't happens in other configurations or even on developer machine. It contains a lot of information useful for debugging, and therefore it size is not so small: around hundreds or even thousands of megabytes. But this is not a problem, since minidump files compresses very effectively using common algorithms.
|
||||||
|
There are short algorithm, explaining how to use this debugging instrument:
|
||||||
|
|
||||||
|
1. User starts your mod with `-minidumps` startup parameter
|
||||||
|
2. Finally, crash happened on user's machine, and minidump file being written. This file has `.mdmp` extension and located in same folder, where mod folder located
|
||||||
|
3. User packs this minidump file to .zip/.7z archive, and somehow sends it to developer
|
||||||
|
4. Developer just opens minidump file in Visual Studio, then a virtual debugging session is opened and now reasons of crash is pretty easy to detect: you can see call stack, local function variables and global variables, information about exception and a lot of other information
|
||||||
|
|
||||||
|
You can find more information about minidumps in this [awesome article](https://learn.microsoft.com/en-us/windows/win32/dxtecharts/crash-dump-analysis?source=recommendations#writing-a-minidump).
|
||||||
24
Documentation/donate.md
Normal file
24
Documentation/donate.md
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Developers donation page
|
||||||
|
|
||||||
|
On this page you can find links where you can support each developer individually, who has provided public sponsorship information.
|
||||||
|
|
||||||
|
### [a1batross](https://github.com/a1batross)
|
||||||
|
|
||||||
|
* Initial Xash3D SDL2/Linux port author, Xash3D FWGS engine maintainer, creator of non-commercial Flying With Gauss organization.
|
||||||
|
* Boosty page: https://boosty.to/a1ba
|
||||||
|
|
||||||
|
### [nekonomicon](https://github.com/nekonomicon)
|
||||||
|
|
||||||
|
* [hlsdk-portable](https://github.com/FWGS/hlsdk-portable), [mdldec](../utils/mdldec), [opensource-mods.md](opensource-mods.md) maintainer and Xash3D FWGS [contributor](https://github.com/FWGS/xash3d-fwgs/commits?author=nekonomicon) (*BSD/clang port, PNG support, etc).
|
||||||
|
* Boosty page: https://boosty.to/nekonomicon
|
||||||
|
|
||||||
|
### [Velaron](https://github.com/Velaron)
|
||||||
|
* [cs16-client](https://github.com/Velaron/cs16-client) & [tf15-client](https://github.com/Velaron/tf15-client) maintainer and Xash3D FWGS [contributor](https://github.com/FWGS/xash3d-fwgs/commits?author=Velaron) (Android port, voice chat, etc).
|
||||||
|
* BuyMeACoffee page: https://www.buymeacoffee.com/velaron
|
||||||
|
|
||||||
|
### [SNMetamorph](https://github.com/SNMetamorph)
|
||||||
|
* [PrimeXT](https://github.com/SNMetamorph/PrimeXT) & [GoldSrc Monitor](https://github.com/SNMetamorph/goldsrc-monitor) maintainer and Xash3D FWGS [contributor](https://github.com/FWGS/xash3d-fwgs/commits?author=SNMetamorph) (Windows port, voice chat, etc).
|
||||||
|
* BTC: `16GAzK3qei5AwBW7sggXp3yNcFHBtdpxXj`
|
||||||
|
* ETH (ERC20): `0xb580eeca9756e3881f9d6d026e28db28eb72a383`
|
||||||
|
* USDT (ERC20): `0xb580eeca9756e3881f9d6d026e28db28eb72a383`
|
||||||
|
* USDC (ERC20): `0xb580eeca9756e3881f9d6d026e28db28eb72a383`
|
||||||
150
Documentation/entity-tools.md
Normal file
150
Documentation/entity-tools.md
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
# There are few new commands availiable in xash3d fork:
|
||||||
|
|
||||||
|
## Commands:
|
||||||
|
### ent_create
|
||||||
|
Create entity with specified classname and key/values
|
||||||
|
|
||||||
|
`ent_create <classname> <key> <value> <key> <value> ...`
|
||||||
|
|
||||||
|
for example:
|
||||||
|
|
||||||
|
`ent_create monster_zombie targetname zomb1`
|
||||||
|
|
||||||
|
after creating entity, ent_last_xxx cvars are set to new entity and ent_last_cb called, look at ent_getvars description
|
||||||
|
|
||||||
|
### ent_fire
|
||||||
|
|
||||||
|
Make some actions on entity
|
||||||
|
|
||||||
|
`ent_fire <pattern> <command> <args>`
|
||||||
|
Availiavle commands:
|
||||||
|
* Set fields (Only set entity field, does not call any functions):
|
||||||
|
* health
|
||||||
|
* gravity
|
||||||
|
* movetype
|
||||||
|
* solid
|
||||||
|
* rendermode
|
||||||
|
* rendercolor (vector)
|
||||||
|
* renderfx
|
||||||
|
* renderamt
|
||||||
|
* hullmin (vector)
|
||||||
|
* hullmax (vector)
|
||||||
|
* Actions
|
||||||
|
* rename: set entity targetname
|
||||||
|
* settarget: set entity target (only targetnames)
|
||||||
|
* setmodel: set entity model (does not update)
|
||||||
|
* set: set key/value by server library
|
||||||
|
* See game FGD to get list.
|
||||||
|
* command takes two arguments
|
||||||
|
* touch: touch entity by current player.
|
||||||
|
* use: use entity by current player.
|
||||||
|
* movehere: place entity in player fov.
|
||||||
|
* drop2floor: place entity to nearest floor surface
|
||||||
|
* moveup: move entity to 25 units up
|
||||||
|
* moveup (value): move by y axis relatively to specified value
|
||||||
|
* Flags (Set/clear specified flag bit, arg is bit number):
|
||||||
|
* setflag
|
||||||
|
* clearflag
|
||||||
|
* setspawnflag
|
||||||
|
* clearspawnflag
|
||||||
|
|
||||||
|
### ent_info
|
||||||
|
Print information about entity by identificator
|
||||||
|
|
||||||
|
`ent_info <identificator>`
|
||||||
|
|
||||||
|
### ent_getvars
|
||||||
|
Set client cvars containing entity information (useful for [[Scripting]]) and call ent_last_cb
|
||||||
|
|
||||||
|
`ent_getvars <identificator>`
|
||||||
|
|
||||||
|
These cvars are set:
|
||||||
|
```
|
||||||
|
ent_last_name
|
||||||
|
ent_last_num
|
||||||
|
ent_last_inst
|
||||||
|
ent_last_origin
|
||||||
|
ent_last_class
|
||||||
|
```
|
||||||
|
|
||||||
|
### ent_list
|
||||||
|
Print short information about antities, filtered by pattern
|
||||||
|
|
||||||
|
`ent_list <pattern>`
|
||||||
|
|
||||||
|
## Syntax description
|
||||||
|
|
||||||
|
### \<identificator\>
|
||||||
|
|
||||||
|
* !cross: entity under aim
|
||||||
|
* Instance code: !\<number\>_\<seria\l>
|
||||||
|
* set by ent_getvars command
|
||||||
|
* Entity index
|
||||||
|
* targetname pattern
|
||||||
|
|
||||||
|
### \<pattern\>
|
||||||
|
|
||||||
|
Pattern is like identificator, but may filter many entities by classname
|
||||||
|
|
||||||
|
### (vector)
|
||||||
|
|
||||||
|
used by ent_fire command. vector means three float values, entered without quotes
|
||||||
|
|
||||||
|
### key/value
|
||||||
|
|
||||||
|
All entities parameters may be set by specifiing key and value strings.
|
||||||
|
|
||||||
|
Originally, this mechanizm is used in map/bsp format, but it can be used in enttools too.
|
||||||
|
|
||||||
|
Keys and values are passed to server library and processed by entity keyvalue function, setting edict and entity owns parameters.
|
||||||
|
|
||||||
|
If value contains spaces, it must be put in quotes:
|
||||||
|
|
||||||
|
`ent_fire !cross set origin "0 0 0"`
|
||||||
|
|
||||||
|
## Using with scripting
|
||||||
|
|
||||||
|
ent_create and ent_getvars commands are setting cvars on client
|
||||||
|
|
||||||
|
It can be used with ent_last_cb alias that is executed after setting cvars.
|
||||||
|
|
||||||
|
Simple example:
|
||||||
|
|
||||||
|
```
|
||||||
|
ent_create weapon_c4
|
||||||
|
alias ent_last_cb "ent_fire \$ent_last_inst use"
|
||||||
|
```
|
||||||
|
|
||||||
|
Use weapon_c4 after creating it.
|
||||||
|
|
||||||
|
Note that you cannot use many dfferent callbacks at the same time.
|
||||||
|
|
||||||
|
You can set entity name by by pattern and create special script, contatning all callbacks.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
example.cfg
|
||||||
|
```
|
||||||
|
alias ent_last_cb exec entity_cb.cfg
|
||||||
|
ent create \<class\> targetname my_ent1_$name
|
||||||
|
ent_create \<class\> targetname my_ent2_$name
|
||||||
|
```
|
||||||
|
entity_cb.cfg
|
||||||
|
```
|
||||||
|
if $ent_last_name == my_ent1_$name
|
||||||
|
:(ent1 actions)
|
||||||
|
if $ent_last_name == my_ent2_$name
|
||||||
|
:(ent2 actions)
|
||||||
|
```
|
||||||
|
Note that scripting cannot be blocking. You cannot wait for server answer and continue. But you can use small scripts, connected with ent_last_cb command. The best usage is user interaction. You can add touch buttons to screen or call user command menu actions by callbacks.
|
||||||
|
## Server side
|
||||||
|
|
||||||
|
To enable entity tools on server, set sv_enttools_enable to 1
|
||||||
|
|
||||||
|
To change maximum number of entities, touched by ent_fire, change sv_enttools_maxfire to required number.
|
||||||
|
|
||||||
|
To enable actions on players, set sv_enttools_players to 1.
|
||||||
|
|
||||||
|
To enable entity tools for player by nickname, set sv_enttools_godplayer to nickname. Useful to temporary enable from rcon.
|
||||||
|
|
||||||
|
To prevent crash on some actions, set host_mapdesign_fatal to 0
|
||||||
21
Documentation/environment-variables.md
Normal file
21
Documentation/environment-variables.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
## Environment variables
|
||||||
|
|
||||||
|
#### Xash3D FWGS
|
||||||
|
|
||||||
|
The engine respects these environment variables:
|
||||||
|
|
||||||
|
| Variable | Type | Description |
|
||||||
|
| --------------------- | ---------- | ----------- |
|
||||||
|
| `XASH3D_GAME` | _string_ | Overrides default game directory. Ignored if `-game` command line argument is set |
|
||||||
|
| `XASH3D_BASEDIR` | _string_ | Sets path to base (root) directory, instead of current working directory |
|
||||||
|
| `XASH3D_RODIR` | _string_ | Sets path to read-only base (root) directory. Ignored if `-rodir` command line argument is set |
|
||||||
|
| `XASH3D_EXTRAS_PAK1` | _string_ | Archive file from specified path will be added to virtual filesystem search path in the lowest possible priority |
|
||||||
|
| `XASH3D_EXTRAS_PAK2` | _string_ | Similar to `XASH3D_EXTRAS_PAK1` but next to it in priority list |
|
||||||
|
|
||||||
|
Environment variables NOT listed in the table above are used internally, and aren't considered as stable interface.
|
||||||
|
|
||||||
|
#### mdldec
|
||||||
|
|
||||||
|
| Variable | Type | Description |
|
||||||
|
| --------------------- | ---------- | ----------- |
|
||||||
|
| `MDLDEC_ACT_PATH` | _string_ | If set, will read activities list from this path |
|
||||||
8
Documentation/extensions/expanded-common-structures.md
Normal file
8
Documentation/extensions/expanded-common-structures.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Expanded structures that used by engine and mods
|
||||||
|
To make porting and developing mods on 64-bit platforms less painful, we decided to expand size of several structures.
|
||||||
|
This information important in case you are using codebase like XashXT, Paranoia 2: Savior and want to compile your mod for platform with 64-bit pointer size: you should replace old definitions with new ones, otherwise your mod will not work with Xash3D FWGS (typically, it's just crashing when starting map).
|
||||||
|
| Structure name | Locates in file | Original size on 64-bit | Current size on 64-bit |
|
||||||
|
|----------------|-----------------|-------------------------|------------------------|
|
||||||
|
|`mfaceinfo_t` | `common/com_model.h` | 176 bytes | 304 bytes |
|
||||||
|
|`decal_s` | `common/com_model.h` | 72 bytes | 88 bytes |
|
||||||
|
|`mextrasurf_t` | `common/com_model.h` | 376 bytes | 504 bytes |
|
||||||
@@ -31,11 +31,14 @@ Issue #0. Inconsistency between ABI and Q_buildarch.\
|
|||||||
Resolution: Change Q_buildarch return value to use Debian-styled architectures list: https://www.debian.org/ports/, which includes a special naming for big/little-endian and hard/soft-float ARM.
|
Resolution: Change Q_buildarch return value to use Debian-styled architectures list: https://www.debian.org/ports/, which includes a special naming for big/little-endian and hard/soft-float ARM.
|
||||||
|
|
||||||
Issue #1: Build-system integration.\
|
Issue #1: Build-system integration.\
|
||||||
Resolution: implemented as [LibraryNaming.cmake](https://github.com/FWGS/hlsdk-xash3d/blob/master/cmake/LibraryNaming.cmake) and [library_naming.py](https://github.com/FWGS/hlsdk-xash3d/blob/master/scripts/waifulib/library_naming.py) extensions, see
|
Resolution: implemented as [LibraryNaming.cmake](https://github.com/FWGS/hlsdk-portable/blob/master/cmake/LibraryNaming.cmake) and [library_naming.py](https://github.com/FWGS/hlsdk-portable/blob/master/scripts/waifulib/library_naming.py) extensions, see
|
||||||
|
|
||||||
Issue #2(related to #0): Which ARM flavours we actually need to handle?\
|
Issue #2(related to #0): Which ARM flavours we actually need to handle?\
|
||||||
Resolution: Little-endian only, as there is no known big-endian ARM platforms in the wild.
|
Resolution: Little-endian only, as there is no known big-endian ARM platforms in the wild.
|
||||||
Architecture is coded this way:
|
Architecture is coded this way:
|
||||||
* ```armvxy```, where `x` is ARM instruction set level and `y` is hard-float ABI presence: `hf` where hard float ABI used, otherwise `l`.
|
* ```armvxy```, where `x` is ARM instruction set level and `y` is hard-float ABI presence: `hf` where hard float ABI used, otherwise `l`.
|
||||||
|
|
||||||
|
Issue #3: Some mods (like The Specialists, Tyrian, ...) already apply suffixes _i386, _i686 to the gamedll path:\
|
||||||
|
Resolution: On x86 on **Win/Lin/Mac**, don't change anything. Otherwise, strip the _i?86 part and follow the usual scheme.
|
||||||
|
|
||||||
See discussion: https://github.com/FWGS/xash3d-fwgs/issues/39
|
See discussion: https://github.com/FWGS/xash3d-fwgs/issues/39
|
||||||
|
|||||||
22
Documentation/extensions/mp3-loops.md
Normal file
22
Documentation/extensions/mp3-loops.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
## Looping MP3 extension
|
||||||
|
|
||||||
|
It is now possible to loop MP3 file in Xash3D FWGS by adding a custom text tag with `LOOP_START` or `LOOPSTART` in description and time point (in raw samples) in value.
|
||||||
|
|
||||||
|
### Example with foobar2000
|
||||||
|
1. Open Foobar2000
|
||||||
|
2. Add your .mp3 file to playlist
|
||||||
|
3. Right click to newly added file and select Properties
|
||||||
|
4. In Metadata tab, at the bottom of the table, select "+add new"
|
||||||
|
5. In newly added line replace `<60>input field name<6D>` with `LOOP_START` (without any symbols).
|
||||||
|
6. Press Tab and enter loop time point in raw samples. For example, `0` will replay sound file from beginning to end indefinitely.
|
||||||
|
|
||||||
|
### Possible alternatives
|
||||||
|
1. Classic WAV files looping. HQ WAV files can take too much disk space, and recommended software supporting cue points is paid, outdated and can't run on modern systems. (Although there is alternative that's proven to work with idTech-based engines called LoopAuditioneer.)
|
||||||
|
2. Vorbis looping through comment. Engine doesn't support Vorbis but this extension was highly inspired by this hack.
|
||||||
|
|
||||||
|
### Known bugs and limitations
|
||||||
|
1. At this time using MP3 as SFX requires complete decoding. This can cause noticeable stutters, so keep MP3 file length in mind.
|
||||||
|
2. We deliberately only support modern ID3v2.3 and ID3v2.4 tags. Using ID3v1 is not possible.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
25
Documentation/extensions/native-object.md
Normal file
25
Documentation/extensions/native-object.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# GetNativeObject API
|
||||||
|
|
||||||
|
To be able to use platform-specific features or get optional engine interfaces, we've added a simple call to MobilityAPI on client DLL and PhysicsAPI for server DLL and extended MenuAPI for menu DLL.
|
||||||
|
|
||||||
|
It's defined like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
void *pfnGetNativeObject( const char *name );
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Cross-platform objects
|
||||||
|
|
||||||
|
Only these objects are guaranteed to be available on all targets.
|
||||||
|
|
||||||
|
| Object name | Interface |
|
||||||
|
|-------------|-----------|
|
||||||
|
| `VFileSystem009` | Provides C++ interface to filesystem, binary-compatible with Valve's VFileSystem009. |
|
||||||
|
| `XashFileSystemXXX` | Provides C interface to filesystem. This interface is unstable and not recommended for generic use, outside of engine internals. For more info about current version look into `filesystem.h`. |
|
||||||
|
|
||||||
|
#### Android-specific objects
|
||||||
|
|
||||||
|
| Object name | Interface |
|
||||||
|
|-------------|-----------|
|
||||||
|
| `JNIEnv` | Allows interfacing with Java Native Interface. |
|
||||||
|
| `ActivityClass` | Returns JNI object for engine Android activity class. |
|
||||||
65
Documentation/extensions/sounds.lst.md
Normal file
65
Documentation/extensions/sounds.lst.md
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
# sounds.lst.md
|
||||||
|
|
||||||
|
Using sounds.lst located in scripts folder, modder can override some of the hardcoded sounds in temp entities and server physics.
|
||||||
|
|
||||||
|
File format:
|
||||||
|
```
|
||||||
|
<group name>
|
||||||
|
{
|
||||||
|
<path1>
|
||||||
|
<path2>
|
||||||
|
<path3>
|
||||||
|
}
|
||||||
|
|
||||||
|
<group2 name> <path with %d> <min number> <max number>
|
||||||
|
```
|
||||||
|
|
||||||
|
* Sounds can use any supported sound format (WAV or MP3).
|
||||||
|
* The path must be relative to the sounds/ folder in the game or base directory root, addon folder, or archive root.
|
||||||
|
* Groups can be empty or omitted from the file to load no sound.
|
||||||
|
* Groups can either list a set of files or specify a format string and a range.
|
||||||
|
* Anything after // will be considered a comment and ignored.
|
||||||
|
* Behavior is undefined if the group was listed multiple times.
|
||||||
|
|
||||||
|
Currently supported groups are:
|
||||||
|
|Group name|Usage|
|
||||||
|
|----------|-----|
|
||||||
|
|`BouncePlayerShell`|Used for BOUNCE_SHELL tempentity hitsound|
|
||||||
|
|`BounceWeaponShell`|Used for BOUCNE_SHOTSHELL tempentity hitsound|
|
||||||
|
|`BounceConcrete`|Used for BOUNCE_CONCRETE tempentity hitsound|
|
||||||
|
|`BounceGlass`|Used for BOUCNE_GLASS|
|
||||||
|
|`BounceMetal`|Used for BOUNCE_METAL|
|
||||||
|
|`BounceFlesh`|Used for BOUNCE_FLESH|
|
||||||
|
|`BounceWood`|Used for BOUNCE_WOOD|
|
||||||
|
|`Ricochet`|Used for BOUNCE_SHRAP and ricochet tempentities|
|
||||||
|
|`Explode`|Used for tempentity explosions|
|
||||||
|
|`EntityWaterEnter`|Used for entity entering water|
|
||||||
|
|`EntityWaterExit`|Used for entity exiting water|
|
||||||
|
|`PlayerWaterEnter`|Used for player entering water|
|
||||||
|
|`PlayerWaterExit`|Used for player exiting water|
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
This example is based on defaults sounds used in Half-Life:
|
||||||
|
|
||||||
|
```
|
||||||
|
BouncePlayerShell "player/pl_shell%d.wav" 1 3
|
||||||
|
BounceWeaponShell "weapons/sshell%d.wav" 1 3
|
||||||
|
BounceConcrete "debris/concrete%d.wav" 1 3
|
||||||
|
BounceGlass "debris/glass%d.wav" 1 4
|
||||||
|
BounceMetal "debris/metal%d.wav" 1 6
|
||||||
|
BounceFlesh "debris/flesh%d.wav" 1 7
|
||||||
|
BounceWood "debris/wood%d.wav" 1 4
|
||||||
|
Ricochet "weapons/ric%d.wav" 1 5
|
||||||
|
Explode "weapons/explode%d.wav" 3 5
|
||||||
|
EntityWaterEnter "player/pl_wade%d.wav" 1 4
|
||||||
|
EntityWaterExit "player/pl_wade%d.wav" 1 4
|
||||||
|
PlayerWaterEnter
|
||||||
|
{
|
||||||
|
"player/pl_wade1.wav"
|
||||||
|
}
|
||||||
|
PlayerWaterExit
|
||||||
|
{
|
||||||
|
"player/pl_wade2.wav"
|
||||||
|
}
|
||||||
|
```
|
||||||
117
Documentation/gameinfo.md
Normal file
117
Documentation/gameinfo.md
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
# Game definition and information file
|
||||||
|
|
||||||
|
gameinfo.txt is an essential part of any Xash3D based game. It allows basic customization for games creators, like setting game title, DLL paths, etc.
|
||||||
|
|
||||||
|
This document defines gameinfo.txt syntax, supported keys and liblist.gam conversion rules for the latest version of the engine. Note for engine developers, keep this document in sync with an implementation.
|
||||||
|
|
||||||
|
## gameinfo.txt syntax
|
||||||
|
|
||||||
|
* gameinfo.txt is a simple list of keys and values, separated by newline.
|
||||||
|
* You can add single line comments using double slashes (//).
|
||||||
|
* Keys can accept integer, float, string or boolean values.
|
||||||
|
* Boolean keys use 0 as false and 1 as true value.
|
||||||
|
* To have spaces in string values, you must enclose them in double quotes. Then, to have double quotes, you must escape it with backslash, and to have a backslash you need to use double backslashes.
|
||||||
|
|
||||||
|
The example:
|
||||||
|
```
|
||||||
|
// this is a comment :)
|
||||||
|
// this is another comment
|
||||||
|
some_integer_key 123
|
||||||
|
|
||||||
|
this_is_float_key 13.37 // optional comment
|
||||||
|
|
||||||
|
enable_feature 1 // boolean, 1 to enable, 0 to disable
|
||||||
|
|
||||||
|
example_string_key string_value
|
||||||
|
example_spaces "string with spaces"
|
||||||
|
example_title "Fate\\Stay Night" // engine will parse it as Fate\Stay Night
|
||||||
|
```
|
||||||
|
|
||||||
|
## gameinfo.txt keys
|
||||||
|
|
||||||
|
This is a list of all gameinfo.txt keys supported by the engine. Be aware that the engine will silently skip all unrecognized keys.
|
||||||
|
|
||||||
|
| Key | Type | Default value | Description |
|
||||||
|
| ---------------- | ---------- | --------------- | ----------- |
|
||||||
|
| `ambient0` | string | Empty string | Automatic ambient sound |
|
||||||
|
| `ambient1` | string | Empty string | Automatic ambient sound |
|
||||||
|
| `ambient2` | string | Empty string | Automatic ambient sound |
|
||||||
|
| `ambient3` | string | Empty string | Automatic ambient sound |
|
||||||
|
| `basedir` | string | `valve` | Game base directory, used to share assets between games |
|
||||||
|
| `date` | string | Empty string | Game release date. Unused. |
|
||||||
|
| `dllpath` | string | `cl_dlls` | Game DLL path. Engine will search custom DLLs (client or menu, for example) in this directory, except `gamedll`, see below. |
|
||||||
|
| `fallback_dir` | string | Empty string | Additional game base directory |
|
||||||
|
| `gamedir` | string | Current gamedir | Game directory, ignored in FWGS, as game directory is defined by the game directory name |
|
||||||
|
| `gamedll` | string | `dlls/hl.dll` | Game server DLL for 32-bit x86 Windows (see LibraryNaming.md for details) |
|
||||||
|
| `gamemode` | string | Empty string | Game type. When set to `singleplayer_only` or `multiplayer_only` marks the game as SP or MP only respectively, hiding the option in game UI. Omitting this key or using custom values mark the game as both MP and SP compatible. |
|
||||||
|
| `icon` | string | `game.ico` | Game icon. Engine will automatically append .ico and may automatically switch to .tga icon as well |
|
||||||
|
| `max_beams` | integer | 128 | Beams limit, 64 min, 512 max |
|
||||||
|
| `max_edicts` | integer | 900 | Entities limit, 600 min, 8192 max (protocol limit). In FWGS, minimum is 64. |
|
||||||
|
| `max_particles` | integer | 4096 | Particles limit, 1024 min, 131072 max |
|
||||||
|
| `max_tempents` | integer | 500 | Temporary entities limit. 300 min, 2048 max |
|
||||||
|
| `mp_entity` | string | `info_player_deathmatch` | Entity used to mark maps as multiplayer |
|
||||||
|
| `mp_filter` | string | Empty string | When set, used to filter multiplayer maps instead of `mp_entity`.<br>If the map name starts with the same characters as this filter, it's considered a multiplayer map |
|
||||||
|
| `nomodels` | boolean | 0 | When set to 1, disallows changing player model in UI |
|
||||||
|
| `noskills` | boolean | 0 | When set to 1, disallows selection of game difficulty |
|
||||||
|
| `secure` | boolean | 0 | When set to 1, original Unkle Mike's engine will completely disable developer mode. FWGS ignores but preserves this value for compatibility. |
|
||||||
|
| `size` | integer | 0 | Game directory size in bytes, used in Change Game dialog only |
|
||||||
|
| `startmap` | string | `c0a0` | The name of the map used in new game |
|
||||||
|
| `sp_entity` | string | `info_player_start` | Entity used to mark map as single player. Used in map validation |
|
||||||
|
| `title` | string | `New Game` | Game title, used in window title, default server name, etc. |
|
||||||
|
| `trainmap` | string | `t0a0` | The name of the training map (Hazard Course) |
|
||||||
|
| `type` | string | Empty string | Game type, used in Change Game UI. |
|
||||||
|
| `url_info` | string | Empty string | Game homepage URL, used in Change Game UI |
|
||||||
|
| `url_update` | string | Empty string | Game updates URL, used in Settings UI |
|
||||||
|
| `version` | float | 1.0 | Game version, used in Change Game dialog and in server info |
|
||||||
|
|
||||||
|
## FWGS-specific gameinfo.txt keys
|
||||||
|
|
||||||
|
These strings are specific to Xash3D FWGS.
|
||||||
|
|
||||||
|
| Key | Type | Default value | Description |
|
||||||
|
| ----------------------- | ---------- | ------------------------ | ----------- |
|
||||||
|
| `animated_title` | boolean | 0 | Use animated title in main menu (WON Half-Life logo.avi imitation from Half-Life 25-th anniversary update)
|
||||||
|
| `autosave_aged_count` | integer | 2 | Auto saves limit used in saves rotation |
|
||||||
|
| `gamedll_linux` | string | Generated from `gamedll` | Game server DLL for 32-bit x86 Linux (see LibraryNaming.md for details) |
|
||||||
|
| `gamedll_osx` | string | Generated from `gamedll` | Game server DLL for 32-bit x86 macOS (see LibraryNaming.md for details) |
|
||||||
|
| `hd_background` | boolean | 0 | Use HD background for main menu (Half-Life 25-th anniversary update) |
|
||||||
|
| `internal_vgui_support` | boolean | 0 | Only for programmers! Required to be set as 1 for PrimeXT!<br>When set to 1, the engine will not load vgui_support DLL, as VGUI support is done (or intentionally ignored) on the game side. |
|
||||||
|
| `render_picbutton_text` | boolean | 0 | When set to 1, the UI will not use prerendered `btns_main.bmp` and dynamically render them instead |
|
||||||
|
| `quicksave_aged_count` | integer | 2 | Quick saves limit used in saves rotation |
|
||||||
|
| `demomap` | string | Empty string | The name of the demo chapter map (Half-Life Uplink) |
|
||||||
|
|
||||||
|
## Note on GoldSrc liblist.gam support
|
||||||
|
|
||||||
|
As Xash3D accidentally supports GoldSrc games, it also supports parsing liblist.gam.\
|
||||||
|
Xash3D will use this file if gameinfo.txt is absent, or if its modification timestamp is older than liblist.gam.
|
||||||
|
|
||||||
|
For game creators who plan supporting only Xash3D, using this file is not recommended.
|
||||||
|
|
||||||
|
The table below defines conversion rules from liblist.gam to gameinfo.txt. Some keys' interpretation does differ from `gameinfo.txt`, in this case a note will be left. If `liblist.gam` key isn't present in this table, it's ignored.
|
||||||
|
|
||||||
|
| `liblist.gam` key | `gameinfo.txt` key | Note |
|
||||||
|
| ----------------- | ------------------ | ---- |
|
||||||
|
| `animated_title` | `animated_title` | |
|
||||||
|
| `edicts` | `max_edicts` | |
|
||||||
|
| `fallback_dir` | `fallback_dir` | |
|
||||||
|
| `game` | `title` | |
|
||||||
|
| `gamedir` | `gamedir` | |
|
||||||
|
| `gamedll` | `gamedll` | |
|
||||||
|
| `gamedll_linux` | `gamedll_linux` | |
|
||||||
|
| `gamedll_osx` | `gamedll_osx` | |
|
||||||
|
| `hd_background` | `hd_background` | |
|
||||||
|
| `icon` | `icon` | |
|
||||||
|
| `mpentity` | `mp_entity` | |
|
||||||
|
| `mpfilter` | `mp_filter` | |
|
||||||
|
| `nomodels` | `nomodels` | |
|
||||||
|
| `secure` | `secure` | In GoldSrc it's used to mark the multiplayer game as anti-cheat enabled.<br>Original Xash3D misinterprets its value for disallowing console and developer mode.<br>FWGS ignores this key but preserves for compatibility. |
|
||||||
|
| `startmap` | `startmap` | |
|
||||||
|
| `size` | `size` | |
|
||||||
|
| `trainingmap` | `trainmap` | |
|
||||||
|
| `trainmap` | `trainmap` | |
|
||||||
|
| `type` | `type` & `gamemode`| In `liblist.gam` this key works as both `type` and `gamemode`.<br>If value is `singleplayer_only` or `multiplayer_only` the game is marked as SP or MP only, and `gameinfo.txt` type set to `Single` or `Multiplayer`.<br>Any custom value will mark the game as both SP and MP compatible, and type is set to whatever custom value. |
|
||||||
|
| `url_dl` | `url_update` | |
|
||||||
|
| `url_info` | `url_info` | |
|
||||||
|
| `version` | `version` | |
|
||||||
|
|
||||||
|
|
||||||
14
Documentation/goldsrc-protocol-support.md
Normal file
14
Documentation/goldsrc-protocol-support.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# Support for GoldSrc network protocol
|
||||||
|
This feature is still work-in-progress, but for now it's available for all users, and we appreciate any bug-reports and contributions around it.
|
||||||
|
|
||||||
|
For connecting to GoldSrc-based servers, use this command:
|
||||||
|
```
|
||||||
|
connect ip:port gs
|
||||||
|
```
|
||||||
|
|
||||||
|
But keep in mind, there are requirement for server to be able to accept connections from Xash3D-based clients: it should accept HLTV connections.
|
||||||
|
Without this requirement, you will just get "Steam validation rejected" error on connecting.
|
||||||
|
|
||||||
|
That is because proper authorization with Steam API is not implemented in engine yet (but we have plans on it).
|
||||||
|
|
||||||
|
In case of ReHLDS with Reunion plugin, by default it rejects HLTV clients. But connections from HLTV can be easily enabled in `reunion.cfg` file.
|
||||||
40
Documentation/hd-textures.md
Normal file
40
Documentation/hd-textures.md
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
### HD (external) textures support
|
||||||
|
|
||||||
|
Xash3D supports loading texture replacements in TGA format for almost all types of models in the game, except alias models at this time.
|
||||||
|
|
||||||
|
Textures are expected to be located at:
|
||||||
|
* `modfolder/materials/<mapname>` - for a specific map
|
||||||
|
* `modfolder/materials/common` - common for all maps
|
||||||
|
* `modfolder/materials/decals` - for decals
|
||||||
|
* `modfolder/materials/models/<model>` - for models (texture name must match the internal texture name in the model)
|
||||||
|
|
||||||
|
Support for high-resolution textures is enabled setting `host_allow_materials` cvar to `1` or in the menu, in "Video options" section.
|
||||||
|
|
||||||
|
#### Xash3D FWGS additions
|
||||||
|
|
||||||
|
In addition to paths above, Xash3D FWGS checks following paths:
|
||||||
|
|
||||||
|
* `modfolder/materials/sprites/<sprite>` - for sprites, except HUD sprites
|
||||||
|
|
||||||
|
Also, to check which texture replacements are loaded successfully, failed or weren't found, a mod developer can set `host_allow_materials` cvar value to `2`. The engine will spew log at any developer level in the following format:
|
||||||
|
|
||||||
|
```
|
||||||
|
Looking for <replacement> replacement... <status code> (<path relative to mod directory>)
|
||||||
|
```
|
||||||
|
|
||||||
|
Status codes:
|
||||||
|
* `OK` - texture replacement file was found and loaded into GPU memory successfully
|
||||||
|
* `FAIL` - texture file was found but hasn't been parsed or loaded successfully. Refer to engine log for more details.
|
||||||
|
* `MISS` - texture file wasn't found
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```
|
||||||
|
Looking for maps/bounce.bsp:!waterblue tex replacement...OK (materials/common/!waterblue.tga)
|
||||||
|
Looking for maps/bounce.bsp:!waterblue_luma tex replacement...MISS (not found)
|
||||||
|
Looking for {shot2 decal replacement...MISS (materials/decals/{shot2.tga)
|
||||||
|
Looking for {shot4 decal replacement...MISS (materials/decals/{shot4.tga)
|
||||||
|
Looking for {shot3 decal replacement...MISS (materials/decals/{shot3.tga)
|
||||||
|
Looking for models/gman tex replacement...FAIL (materials/models/gman/GMan_Case1.tga)
|
||||||
|
Looking for models/gman tex replacement...FAIL (materials/models/gman/inside_1.tga)
|
||||||
|
```
|
||||||
|
|
||||||
@@ -1,7 +1,40 @@
|
|||||||
# Server porting
|
# Self-made port
|
||||||
|
## Compatibility with RISC architectures
|
||||||
|
### Unaligned access
|
||||||
|
Unaligned access on **i386** causes only performance penalty, but on **RISC** it can cause unstable work.
|
||||||
|
|
||||||
|
For HLSDK at least you need such patches in util.cpp:
|
||||||
|
- https://github.com/FWGS/halflife/commit/7bfefe86e35d67867ae7af830ac1fc38f2908360
|
||||||
|
- https://github.com/FWGS/hlsdk-portable/commit/617d75545f2ecb9b2d46cc30728dc37c9eb6d35e
|
||||||
|
|
||||||
|
### Signed chars
|
||||||
|
`char` type defined as **signed** for **x86** and as **unsigned** for **arm**.
|
||||||
|
|
||||||
|
And sometimes such difference can break logic.
|
||||||
|
|
||||||
|
As a solution you can use `signed char` type in code directly or use `-fsigned-char` option for gcc/clang compilers.
|
||||||
|
|
||||||
|
For HLSDK at least you need such [fix](https://github.com/FWGS/hlsdk-portable/commit/1ca34fcb4381682bd517612b530db22a1354a795) in nodes.cpp/.h.
|
||||||
|
|
||||||
|
## Compatibility with 64bit architectures
|
||||||
|
You need list of patches for Studio Model Render, MAKE_STRING macro and nodes:
|
||||||
|
- https://github.com/FWGS/hlsdk-portable/commit/d287ed446332e615ab5fb25ca81b99fa14d18a73
|
||||||
|
- https://github.com/FWGS/hlsdk-portable/commit/3bce17e3a04f8af10a927a07ceb8ab0f09152ec4
|
||||||
|
- https://github.com/FWGS/hlsdk-portable/commit/9ebfc981773ec4c7a89ffe52d9c249e1fbef9634
|
||||||
|
- https://github.com/FWGS/hlsdk-portable/commit/00833188dab87ef5746286479ba5aeb9d83b4a0c
|
||||||
|
- https://github.com/FWGS/hlsdk-portable/commit/4661b5c1a5245b27a5532745c11e44b5540e4172
|
||||||
|
- https://github.com/FWGS/hlsdk-portable/commit/2b61380146b1d58a8c465f0e312c061b12bda115
|
||||||
|
- https://github.com/FWGS/hlsdk-portable/commit/8ef6cb2427ee16a763103bd3f315f38e2f01cfe2
|
||||||
|
|
||||||
|
## Mobility API
|
||||||
|
Xash3D FWGS has special extended interface in `mobility_int.h` which adds some new features like vibration on mobile platforms.
|
||||||
|
|
||||||
|
## Porting server-side code
|
||||||
Original valve's server code was compatible with linux and gcc 2.x.
|
Original valve's server code was compatible with linux and gcc 2.x.
|
||||||
|
|
||||||
Newer gcc versions have restriction which breaks build.
|
Newer gcc versions have restriction which breaks build.
|
||||||
Now, to make it building with gcc 4.x, you need do following:
|
|
||||||
|
Now, to make it building with gcc 4.x+ or clang, you need to do following:
|
||||||
* Go to cbase.h and redefine macros as following
|
* Go to cbase.h and redefine macros as following
|
||||||
```
|
```
|
||||||
#define SetThink( a ) m_pfnThink = static_cast <void (CBaseEntity::*)(void)> (&a)
|
#define SetThink( a ) m_pfnThink = static_cast <void (CBaseEntity::*)(void)> (&a)
|
||||||
@@ -18,58 +51,60 @@ Now, to make it building with gcc 4.x, you need do following:
|
|||||||
* Replace all SetThink(NULL), SetTouch(NULL), setUse(NULL) and SetBlocked(NULL) by ResetThink(), ResetTouch(), ResetUse() and ResetBlocked()
|
* Replace all SetThink(NULL), SetTouch(NULL), setUse(NULL) and SetBlocked(NULL) by ResetThink(), ResetTouch(), ResetUse() and ResetBlocked()
|
||||||
* Sometimes you may need to add #include <ctype.h> if functions tolower or isspace are missing
|
* Sometimes you may need to add #include <ctype.h> if functions tolower or isspace are missing
|
||||||
|
|
||||||
# Client porting
|
## Porting client-side code
|
||||||
|
|
||||||
## VGUI library
|
|
||||||
|
|
||||||
Valve's client uses vgui library which is available only on x86 systems and has big amount of mistakes in headers. The best and simplest way of porting is removing VGUI dependency at all.
|
|
||||||
Most singleplayer mods don't really use VGUI at all. It is used in multiplayer only to show score table and MOTD window
|
|
||||||
|
|
||||||
## Porting
|
|
||||||
|
|
||||||
### First strategy: full port
|
|
||||||
|
|
||||||
#### Basic port (Stage 1)
|
|
||||||
* First, remove all files and headers which use vgui (contains "vgui" in file name).
|
|
||||||
* After that, try to build it and remove vgui includes.
|
|
||||||
* Remove all gViewPort usings.
|
|
||||||
* Remove all CVoiceManager usings (xash3d does not support voice)
|
|
||||||
* Redefine all DLLEXPORT defines as empty field (Place it under _WIN32 macro if you want to keep windows compatibility).
|
* Redefine all DLLEXPORT defines as empty field (Place it under _WIN32 macro if you want to keep windows compatibility).
|
||||||
* Remove hud_servers.cpp and Servers_Init/Servers_Shutdown from hud.cpp
|
* Remove hud_servers.cpp and Servers_Init/Servers_Shutdown from hud.cpp.
|
||||||
* Fix CAPS filenames in includes (like STDIO.H, replace by stdio.h).
|
* Fix CAPS filenames in includes (like STDIO.H, replace by stdio.h).
|
||||||
* Replace broken macros as DECLARE_MESSAGE, DECLARE_COMMAND by fixed examples from our hlsdk-xash3d port (cl_util.h)
|
* Replace broken macros as DECLARE_MESSAGE, DECLARE_COMMAND by fixed examples from our hlsdk-portable port (cl_util.h).
|
||||||
* Add ctype.h where it is need (tolower, isspace functions)
|
* Add ctype.h where is needed (tolower, isspace functions).
|
||||||
* Add string.h where it is need (memcpy, strcpy, etc)
|
* Add string.h where is needed (memcpy, strcpy, etc).
|
||||||
* Use in_defs.h from hlsdk_client
|
* Use in_defs.h from hlsdk-portable.
|
||||||
* Add scoreboard_stub.cpp and input_stub.cpp from hlsdk-xash3d to fix linking.
|
* Add input_xash3d.cpp from hlsdk-portable project to fix input.
|
||||||
Now your client should be able to build and work correctly. Add input_xash3d.cpp from hlsdk-xash3d project to fix input.
|
|
||||||
|
|
||||||
#### Multiplayer fix (Stage 2)
|
Now your client should be able to build and work correctly.
|
||||||
Look at hlsdk-xash3d project.
|
|
||||||
|
|
||||||
Main changes are:
|
# Porting mod to hlsdk-portable
|
||||||
* Add MOTD.cpp, scoreboard.cpp and input_xash3d.cpp
|
Look at changes which was made.
|
||||||
* Add missing functions to hud_redraw.cpp, hud.cpp and tri.cpp, fix class defination in hud.h
|
|
||||||
* Remove duplicate functions from hud.cpp and HOOK_MESSAGE's for it
|
|
||||||
* Remove +showscores/-showscores hooks from input.h
|
|
||||||
* Fix cl_util.h
|
|
||||||
|
|
||||||
### Second way: move mod to hlsdk-xash3d
|
If there are not too much changes (for example, only some weapons was added), add these changes in hlsdk-portable.
|
||||||
Look at changes you made in client.
|
|
||||||
|
|
||||||
If there are not much changes (for example, only some weapons was add), add these changes in hlsdk-xash3d.
|
You can use diff with original HLSDK and apply it as patch to hlsdk-portable.
|
||||||
|
|
||||||
You may use diff with original HLSDK you used and apply it as patch to hlsdk-xash3d.
|
|
||||||
|
|
||||||
|
```
|
||||||
|
NOTE: Many an old mods was made on HLSDK 2.0-2.1 and some rare mods on HLSDK 1.0.
|
||||||
|
So you need to have different versions of HLSDK to make diffs.
|
||||||
|
Plus different Spirit of Half-Life versions if mod was made on it.
|
||||||
|
Also, weapons in old HLSDK versions does not use client weapon prediction system and you may be need to port standart half-life weapons to server side.
|
||||||
|
```
|
||||||
Files must have same line endings (use dos2unix on all files).
|
Files must have same line endings (use dos2unix on all files).
|
||||||
|
|
||||||
I recommend to enable ignoring space changes in diff.
|
We recommend to enable ignoring space changes in diff.
|
||||||
### Writing Makefiles
|
|
||||||
|
|
||||||
Use Makefile from hlsdk-xash3d as Makefile example.
|
Move all new files to separate directories.
|
||||||
|
|
||||||
Get .c and .cpp file lists from Visual Studio project and fill SRCS and SRCS_C variables to Makefile.
|
# Possible replacements for non-portable external dependencies
|
||||||
|
1. If mod uses **fmod.dll** or **base.dll** to play mp3/ogg on client-side or to precache sounds on server-side, you can replace it with:
|
||||||
|
- [pfnPrimeMusicStream](https://github.com/FWGS/hlsdk-portable/blob/master/engine/cdll_int.h#L293=) engine callback;
|
||||||
|
- [miniaudio](https://github.com/mackron/miniaudio);
|
||||||
|
- [phonon](https://community.kde.org/Phonon).
|
||||||
|
|
||||||
Remove all files containing vgui in name from list, add missing include dirs.
|
2. If mod uses **OpenGL**, porting code to Xash3D render interface is recommended.
|
||||||
|
|
||||||
|
3. If mod uses **cg.dll**, you can try to port code to [NVFX](https://github.com/tlorach/nvFX).
|
||||||
|
|
||||||
|
4. If mod uses detours, comment code or try to find replacement somehow by yourself.
|
||||||
|
|
||||||
|
# Additional recommendations
|
||||||
|
1. If mod uses STL, you can replace it with [MiniUTL](https://github.com/FWGS/MiniUTL).
|
||||||
|
2. Avoid to use dynamic casts to make small size binaries.
|
||||||
|
3. Avoid to use exceptions to make small size binaries.
|
||||||
|
|
||||||
|
# Writing build scripts
|
||||||
|
|
||||||
|
Use wscript/CMakeLists.txt files from hlsdk-portable as build scripts example.
|
||||||
|
|
||||||
|
Get .c and .cpp file lists from Visual Studio project.
|
||||||
|
|
||||||
|
Add missing include dirs.
|
||||||
|
|
||||||
Do same for Android.mk if you are building for android.
|
|
||||||
|
|||||||
15
Documentation/musl.md
Normal file
15
Documentation/musl.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# Xash3D FWGS on `musl`
|
||||||
|
|
||||||
|
Xash3D FWGS works on `musl` out of the box. However, the engine doesn't try to differentiate glibc and musl anymore. If you see error similar to:
|
||||||
|
|
||||||
|
```
|
||||||
|
Host_InitError: can't initialize cl_dlls/client.so: Error relocating valve/cl_dlls/client.so: __sprintf_chk: symbol not found
|
||||||
|
```
|
||||||
|
|
||||||
|
... or you know that the game you're running is linked against glibc, you can try using `libgcompat`, like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ LD_PRELOAD=/lib/libgcompat.so.0 ./xash3d ...
|
||||||
|
```
|
||||||
|
|
||||||
|
It will automatically add the missing symbols that glibc binaries usually need. In the future we might automatically link engine against `libgcompat` for better compatibility with prebuilt or closed-source games, if there will be any use for this.
|
||||||
@@ -17,7 +17,7 @@ Mirrored on github - https://github.com/JoelTroch/am_src_rebirth
|
|||||||
Mirrored on github - https://github.com/nekonomicon/BattleGrounds
|
Mirrored on github - https://github.com/nekonomicon/BattleGrounds
|
||||||
|
|
||||||
## Bubblemod
|
## Bubblemod
|
||||||
Download page on official site - http://www.bubblemod.org/dl_default.php (dead link!)
|
Download page on official site(WM snapshot) - [http://www.bubblemod.org/dl_default.php](https://web.archive.org/web/20130717133158/http://www.bubblemod.org/dl_default.php)
|
||||||
|
|
||||||
Mirrored on github - https://github.com/HLSources/BubbleMod
|
Mirrored on github - https://github.com/HLSources/BubbleMod
|
||||||
|
|
||||||
@@ -85,6 +85,9 @@ Official gitlab repository - https://gitlab.com/Sockman/hltopdown
|
|||||||
## Half-Life: Update
|
## Half-Life: Update
|
||||||
Official github repository - https://github.com/Fograin/hl-subsmod-ex
|
Official github repository - https://github.com/Fograin/hl-subsmod-ex
|
||||||
|
|
||||||
|
## Half-Life: Rally
|
||||||
|
Official gitlab repository - https://gitlab.com/hlrally/src
|
||||||
|
|
||||||
## Half-Life: Weapon Edition
|
## Half-Life: Weapon Edition
|
||||||
Available on ModDB - https://www.moddb.com/mods/half-life-weapon-edition/downloads/half-life-weapon-edition-1508-alpha-open-src
|
Available on ModDB - https://www.moddb.com/mods/half-life-weapon-edition/downloads/half-life-weapon-edition-1508-alpha-open-src
|
||||||
|
|
||||||
@@ -127,22 +130,11 @@ Official github repository - https://github.com/unknownworlds/NS
|
|||||||
## Overturn
|
## Overturn
|
||||||
Available in mod archive on ModDB - https://www.moddb.com/mods/overturn
|
Available in mod archive on ModDB - https://www.moddb.com/mods/overturn
|
||||||
|
|
||||||
## Spirit of Half-Life
|
## Oz Deathmatch
|
||||||
[Logic&Trick's](https://github.com/LogicAndTrick) mirror - https://files.logic-and-trick.com/#/Half-Life/Mods/Spirit%20of%20Half-Life
|
Mirrored on github - https://github.com/nekonomicon/OZDM
|
||||||
|
|
||||||
## Threewave CTF
|
|
||||||
*Unfinished mod by Valve Software*
|
|
||||||
|
|
||||||
Available in Valve's Half-Life repository with Deathmatch Classic sources - https://github.com/ValveSoftware/halflife/tree/master/dmc
|
|
||||||
|
|
||||||
## Trinity Render
|
|
||||||
Available on ModDB: https://www.moddb.com/mods/half-life-episode-two/downloads/trinity-rendering-engine-v308f
|
|
||||||
|
|
||||||
## Tyrian: Ground Assault
|
|
||||||
Available on ModDB: https://www.moddb.com/mods/tyriangroundassault/downloads/tyrianga-v1-0-src
|
|
||||||
|
|
||||||
## Paranoia
|
## Paranoia
|
||||||
Available on ModDB: https://www.moddb.com/mods/paranoia/downloads/paranoia-toolkit
|
Available on ModDB - https://www.moddb.com/mods/paranoia/downloads/paranoia-toolkit
|
||||||
|
|
||||||
## Paranoia 2: The Savior
|
## Paranoia 2: The Savior
|
||||||
Prealpha, mirrored on github - https://github.com/a1batross/Paranoia2_ancient
|
Prealpha, mirrored on github - https://github.com/a1batross/Paranoia2_ancient
|
||||||
@@ -157,12 +149,37 @@ Was found on HLFX - http://hlfx.ru/forum/showthread.php?s=2c892dfc52f72be52a89c3
|
|||||||
## Ricochet
|
## Ricochet
|
||||||
Available in Valve's Half-Life repository - https://github.com/ValveSoftware/halflife/tree/master/ricochet
|
Available in Valve's Half-Life repository - https://github.com/ValveSoftware/halflife/tree/master/ricochet
|
||||||
|
|
||||||
|
## Spirit of Half-Life
|
||||||
|
[Logic&Trick's](https://github.com/LogicAndTrick) mirror - https://files.logic-and-trick.com/#/Half-Life/Mods/Spirit%20of%20Half-Life
|
||||||
|
|
||||||
|
## The Wastes
|
||||||
|
Version 1.5: mirrored on code.idtech.space - https://code.idtech.space/vera/halflife-thewastes-sdk
|
||||||
|
|
||||||
|
## Threewave CTF
|
||||||
|
*Unfinished mod by Valve Software*
|
||||||
|
|
||||||
|
Available in Valve's Half-Life repository with Deathmatch Classic sources - https://github.com/ValveSoftware/halflife/tree/master/dmc
|
||||||
|
|
||||||
|
## Trinity Render
|
||||||
|
Available on ModDB - https://www.moddb.com/mods/half-life-episode-two/downloads/trinity-rendering-engine-v308f
|
||||||
|
|
||||||
|
## Tyrian: Ground Assault
|
||||||
|
Available on ModDB - https://www.moddb.com/mods/tyriangroundassault/downloads/tyrianga-v1-0-src
|
||||||
|
|
||||||
|
## Wasteland
|
||||||
|
Mirrored on code.idtech.space - https://code.idtech.space/vera/halflife-wasteland-sdk
|
||||||
|
|
||||||
## Wizard Wars
|
## Wizard Wars
|
||||||
Download page on official site - http://www.thothie.com/ww/
|
Download page on official site - http://www.thothie.com/ww/
|
||||||
|
|
||||||
## XashXT
|
## XashXT
|
||||||
Mirrored on github - https://github.com/a1batross/XashXT_original
|
Mirrored on github - https://github.com/a1batross/XashXT_original
|
||||||
|
|
||||||
|
## Xen-Warrior
|
||||||
|
*Source code is a part of Spirit of Half-Life 1.0-1.2 under XENWARRIOR macro*
|
||||||
|
|
||||||
|
[Logic&Trick's](https://github.com/LogicAndTrick) mirror - https://files.logic-and-trick.com/#/Half-Life/Mods/Spirit%20of%20Half-Life
|
||||||
|
|
||||||
## Zombie-X
|
## Zombie-X
|
||||||
Available in mod archive on ModDB - https://www.moddb.com/mods/zombie-x-10-final/downloads/zombie-x-10-dle-beta6-last-version
|
Available in mod archive on ModDB - https://www.moddb.com/mods/zombie-x-10-final/downloads/zombie-x-10-dle-beta6-last-version
|
||||||
|
|
||||||
@@ -184,12 +201,12 @@ malortie's recreation - https://github.com/malortie/hl-aom
|
|||||||
Branch **aom** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/aom
|
Branch **aom** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/aom
|
||||||
|
|
||||||
## Afraid of Monsters: Director's cut
|
## Afraid of Monsters: Director's cut
|
||||||
Reverse-engineered code, branch **aomdc** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/aomdc
|
Reverse-engineered code: branch **aomdc** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/aomdc
|
||||||
|
|
||||||
## Azure Sheep
|
## Azure Sheep
|
||||||
malortie's recreation - https://github.com/malortie/hl-asheep
|
malortie's recreation - https://github.com/malortie/hl-asheep
|
||||||
|
|
||||||
Reverse-engineered code, branch **asheep** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/asheep
|
Reverse-engineered code: branch **asheep** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/asheep
|
||||||
|
|
||||||
## Big Lolly
|
## Big Lolly
|
||||||
malortie's recreation - https://github.com/malortie/hl-biglolly
|
malortie's recreation - https://github.com/malortie/hl-biglolly
|
||||||
@@ -211,7 +228,7 @@ Branch **caseclosed** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable
|
|||||||
Branch **CAd** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/CAd
|
Branch **CAd** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/CAd
|
||||||
|
|
||||||
## Counter Strike
|
## Counter Strike
|
||||||
Reverse-engineered code of client part by a1batross - https://github.com/FWGS/cs16-client/tree/v1.32
|
Reverse-engineered code of client part by a1batross - https://github.com/Velaron/cs16-client
|
||||||
|
|
||||||
Reverse-engineered code of server part by nagist - https://github.com/nagist/cs16nd
|
Reverse-engineered code of server part by nagist - https://github.com/nagist/cs16nd
|
||||||
|
|
||||||
@@ -223,15 +240,22 @@ CSO-like Xash3D-based mod, CSMoE - https://github.com/MoeMod/CSMoE
|
|||||||
## Crack-Life: Campaign Mode
|
## Crack-Life: Campaign Mode
|
||||||
Recreation by lostgamer aka nillerusr - https://github.com/LostGamerHL/crack_life
|
Recreation by lostgamer aka nillerusr - https://github.com/LostGamerHL/crack_life
|
||||||
|
|
||||||
|
Reverse-engineered code: branch **clcampaign** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/clcampaign
|
||||||
|
|
||||||
## Escape from the Darkness
|
## Escape from the Darkness
|
||||||
malortie's recreation - https://github.com/malortie/hl-eftd
|
malortie's recreation - https://github.com/malortie/hl-eftd
|
||||||
|
|
||||||
Reverse-engineered code, branch **eftd** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/eftd
|
Reverse-engineered code: branch **eftd** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/eftd
|
||||||
|
|
||||||
|
## Half-Life: Black Guard
|
||||||
|
*This mod uses dlls from Cleaner's Adventures*
|
||||||
|
|
||||||
|
Branch **CAd** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/CAd
|
||||||
|
|
||||||
## Half-Life: Blue Shift
|
## Half-Life: Blue Shift
|
||||||
Unkle Mike's recreation - https://hlfx.ru/forum/showthread.php?s=&threadid=5253
|
Unkle Mike's recreation - https://hlfx.ru/forum/showthread.php?s=&threadid=5253
|
||||||
|
|
||||||
Reverse-engineered code, branch **bshift** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/bshift
|
Reverse-engineered code: branch **bshift** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/bshift
|
||||||
|
|
||||||
## Half-Life: Induction
|
## Half-Life: Induction
|
||||||
Branch **induction** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/induction
|
Branch **induction** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/induction
|
||||||
@@ -239,12 +263,12 @@ Branch **induction** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/
|
|||||||
## Half-Life: Opposing Force
|
## Half-Life: Opposing Force
|
||||||
Recreation by lostgamer aka nillerusr - https://github.com/LostGamerHL/hlsdk-xash3d
|
Recreation by lostgamer aka nillerusr - https://github.com/LostGamerHL/hlsdk-xash3d
|
||||||
|
|
||||||
Reverse-engineered code, clean branch **opfor** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/opfor
|
Reverse-engineered code: clean branch **opfor** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/opfor
|
||||||
|
|
||||||
Spirit of Half Life: Opposing-Force Edition - https://github.com/Hammermaps-DEV/SOHL-V1.9-Opposing-Force-Edition
|
Spirit of Half Life: Opposing-Force Edition - https://github.com/Hammermaps-DEV/SOHL-V1.9-Opposing-Force-Edition
|
||||||
|
|
||||||
## Half-Life: Rebellion
|
## Half-Life: Rebellion
|
||||||
Reverse-engineered code, branch **rebellion** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/rebellion
|
Reverse-engineered code: branch **rebellion** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/rebellion
|
||||||
|
|
||||||
## Half-Life: Urbicide
|
## Half-Life: Urbicide
|
||||||
Branch **hl_urbicide** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/hl_urbicide
|
Branch **hl_urbicide** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/hl_urbicide
|
||||||
@@ -252,7 +276,7 @@ Branch **hl_urbicide** in hlsdk-portable - https://github.com/FWGS/hlsdk-portabl
|
|||||||
## Half-Life: Visitors
|
## Half-Life: Visitors
|
||||||
malortie's recreation - https://github.com/malortie/hl-visitors
|
malortie's recreation - https://github.com/malortie/hl-visitors
|
||||||
|
|
||||||
Reverse-engineered code, branch **visitors** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/visitors
|
Reverse-engineered code: branch **visitors** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/visitors
|
||||||
|
|
||||||
## Half-Secret
|
## Half-Secret
|
||||||
Branch **half-secret** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/half-secret
|
Branch **half-secret** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/half-secret
|
||||||
@@ -265,18 +289,18 @@ Branch **noffice** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tr
|
|||||||
## Poke 646
|
## Poke 646
|
||||||
malortie's recreation - https://github.com/malortie/hl-poke646
|
malortie's recreation - https://github.com/malortie/hl-poke646
|
||||||
|
|
||||||
Reverse-engineered code, branch **poke646** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/poke646
|
Reverse-engineered code: branch **poke646** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/poke646
|
||||||
|
|
||||||
## Poke 646: Vendetta
|
## Poke 646: Vendetta
|
||||||
malortie's recreation - https://github.com/malortie/hl-poke646-vendetta
|
malortie's recreation - https://github.com/malortie/hl-poke646-vendetta
|
||||||
|
|
||||||
Reverse-engineered code, branch **poke646_vendetta** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/poke646_vendetta
|
Reverse-engineered code: branch **poke646_vendetta** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/poke646_vendetta
|
||||||
|
|
||||||
## Residual Life
|
## Residual Life
|
||||||
Reverse-engineered code, branch **residual_point** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/residual_point
|
Reverse-engineered code: branch **residual_point** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/residual_point
|
||||||
|
|
||||||
## Residual Point
|
## Residual Point
|
||||||
Reverse-engineered code, branch **residual_point** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/residual_point
|
Reverse-engineered code: branch **residual_point** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/residual_point
|
||||||
|
|
||||||
## Sewer Beta
|
## Sewer Beta
|
||||||
Branch **sewer_beta** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/sewer_beta
|
Branch **sewer_beta** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/sewer_beta
|
||||||
@@ -287,12 +311,12 @@ Reverse-engineered code by Velaron - https://github.com/Velaron/tf15-client
|
|||||||
## The Gate
|
## The Gate
|
||||||
malortie's recreation - https://github.com/malortie/hl-thegate
|
malortie's recreation - https://github.com/malortie/hl-thegate
|
||||||
|
|
||||||
Reverse-engineered code, branch **thegate** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/thegate
|
Reverse-engineered code: branch **thegate** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/thegate
|
||||||
|
|
||||||
## They Hunger
|
## They Hunger
|
||||||
malortie's recreation - https://github.com/malortie/hl-theyhunger
|
malortie's recreation - https://github.com/malortie/hl-theyhunger
|
||||||
|
|
||||||
Reverse-engineered code, branch **theyhunger** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/theyhunger
|
Reverse-engineered code: branch **theyhunger** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/theyhunger
|
||||||
|
|
||||||
They Hunger: Tactical - https://www.moddb.com/mods/they-hunger-tactical/downloads/tht-source-code-documentation
|
They Hunger: Tactical - https://www.moddb.com/mods/they-hunger-tactical/downloads/tht-source-code-documentation
|
||||||
|
|
||||||
@@ -335,16 +359,22 @@ Branch **half-screwed** in hlsdk-portable - https://github.com/FWGS/hlsdk-portab
|
|||||||
Port to Linux - https://github.com/fmoraw/NS
|
Port to Linux - https://github.com/fmoraw/NS
|
||||||
|
|
||||||
## Spirit of Half-Life
|
## Spirit of Half-Life
|
||||||
Version 1.2, branch **sohl1.2** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/sohl1.2
|
Version 1.2: branch **sohl1.2** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/sohl1.2
|
||||||
|
|
||||||
## Swiss Cheese Halloween 2002
|
## Swiss Cheese Halloween 2002
|
||||||
Just more playable version by malortie - https://github.com/malortie/hl-shall
|
Just more playable version by malortie - https://github.com/malortie/hl-shall
|
||||||
|
|
||||||
Branch **halloween** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/halloween
|
Branch **halloween** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/halloween
|
||||||
|
|
||||||
|
## The Wastes
|
||||||
|
Version 1.5: Port to Linux - https://git.mentality.rip/a1batross/halflife-thewastes-sdk
|
||||||
|
|
||||||
## Threewave CTF
|
## Threewave CTF
|
||||||
Branch **dmc** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/dmc
|
Branch **dmc** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/dmc
|
||||||
|
|
||||||
|
## Xen-Warrior
|
||||||
|
Branch **sohl1.2** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/sohl1.2
|
||||||
|
|
||||||
## Zombie-X
|
## Zombie-X
|
||||||
Branch **zombie-x** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/zombie-x
|
Branch **zombie-x** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/zombie-x
|
||||||
|
|
||||||
|
|||||||
@@ -2,37 +2,32 @@ Xash3D FWGS is intended to be easily ported to specific platform, however main i
|
|||||||
|
|
||||||
This page is about merged ports to main source tree and responsible for it developers.
|
This page is about merged ports to main source tree and responsible for it developers.
|
||||||
|
|
||||||
For porting guidelines, look here(TODO!)
|
For porting guidelines, look engine-porting-guide.md.
|
||||||
|
|
||||||
Status:
|
Status:
|
||||||
* **Supported**: active, confirmed to be fully functional.
|
* **Supported**: active, was confirmed to be fully functional.
|
||||||
* **In progress**: active, under development.
|
* **In progress**: active, under development.
|
||||||
* **Incomplete**: not active, but some work was accepted to main repository before
|
|
||||||
* **Old Engine**: port was for old engine fork
|
* **Old Engine**: port was for old engine fork
|
||||||
* **Not maintained**: lack of human resources
|
* **Not maintained**: lack of human resources
|
||||||
* **Not merged**: was done in third-party fork, real status unknown
|
|
||||||
* **Deprecated**: not supported anymore
|
* **Deprecated**: not supported anymore
|
||||||
|
|
||||||
Table is sorted by status.
|
Table is sorted by status and platform.
|
||||||
|
|
||||||
| Platform | Status | Maintainer | Note
|
| Platform | Status | Maintainer | Note
|
||||||
| -------- | ------ | ---------- | ----
|
| -------- | ------ | ---------- | ----
|
||||||
| Windows | Supported | @a1batross, @SNMetamorph |
|
| Android | Supported | @Velaron |
|
||||||
| *BSD | Supported | @nekonomicon |
|
| *BSD | Supported | @nekonomicon |
|
||||||
| GNU/Linux(x86, amd64, arm) | Supported | @a1batross, @mittorn |
|
|
||||||
| Android | Supported | @a1batross, @mittorn |
|
|
||||||
| MotoMAGX | Supported | @a1batross |
|
|
||||||
| GNU/Linux(elbrus) | Supported | @a1batross, @mittorn | Rare and eventual access to e2k machine
|
|
||||||
| Haiku | Supported | not maintained | Was added by #478 and #483
|
|
||||||
| DOS4GW | Supported | @mittorn |
|
| DOS4GW | Supported | @mittorn |
|
||||||
| GNU/Linux(mipsel) | Supported | @mittorn |
|
| GNU/Linux | Supported | @a1batross, @mittorn |
|
||||||
| Switch | In progress | @fgsfdsfgs | [GitHub Repository](https://github.com/fgsfdsfgs/xash3d-fwgs/tree/switch_new)
|
| Haiku | Supported | not maintained | Was added by #478 and #483
|
||||||
| Wii | In progress | Collaborative effort | [GitHub Repository](https://github.com/saucesaft/xash3d-wii)
|
| macOS | Supported | @sofakng |
|
||||||
|
| MotoMAGX | Supported | @a1batross |
|
||||||
|
| PSVita | Supported | @fgsfdsfgs |
|
||||||
|
| Switch | Supported | @fgsfdsfgs |
|
||||||
|
| Windows | Supported | @a1batross, @SNMetamorph |
|
||||||
| PSP | In progress | @Crow_bar, @Velaron | [GitHub Repository](https://github.com/Crow-bar/xash3d-fwgs)
|
| PSP | In progress | @Crow_bar, @Velaron | [GitHub Repository](https://github.com/Crow-bar/xash3d-fwgs)
|
||||||
|
| Wii | In progress | Collaborative effort | [GitHub Repository](https://github.com/saucesaft/xash3d-wii)
|
||||||
| Emscripten | Old Engine | not maintained |
|
| Emscripten | Old Engine | not maintained |
|
||||||
| Oculus Quest | Old Engine fork | @DrBeef | [GitHub Repository](https://github.com/DrBeef/Lambda1VR)
|
|
||||||
| PSVita | Old Engine fork | not maintained | [GitHub Repository](https://github.com/fgsfdsfgs/vitaXash3D)
|
|
||||||
| Switch | Old Engine fork | not maintained | [GitHub Repository](https://github.com/switchports/xash3d-switch)
|
|
||||||
| 3DS | Old Engine fork | not maintained | [GitHub Repository](https://github.com/masterfeizz/Xash3DS)
|
| 3DS | Old Engine fork | not maintained | [GitHub Repository](https://github.com/masterfeizz/Xash3DS)
|
||||||
| macOS | Deprecated | not maintained | See GitHub issue #61
|
| Oculus Quest | Old Engine fork | @DrBeef | [GitHub Repository](https://github.com/DrBeef/Lambda1VR)
|
||||||
| iOS | Deprecated | not maintained | See GitHub issue #61
|
| iOS | Deprecated | not maintained | See GitHub issue #61
|
||||||
|
|||||||
49
Documentation/psvita.md
Normal file
49
Documentation/psvita.md
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
## PlayStation Vita port
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
1. Make sure your PSVita is [set up to run homebrew applications](https://vita.hacks.guide/).
|
||||||
|
2. Install [kubridge](https://github.com/TheOfficialFloW/kubridge/releases/) by copying `kubridge.suprx` to your taiHEN plugins folder (usually `ux0:/tai`) and add it to your `config.txt`, for example:
|
||||||
|
```
|
||||||
|
*KERNEL
|
||||||
|
ux0:tai/kubridge.skprx
|
||||||
|
```
|
||||||
|
3. Install `libshacccg.suprx` by following [this guide](https://cimmerian.gitbook.io/vita-troubleshooting-guide/shader-compiler/extract-libshacccg.suprx).
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
1. If you have an old vitaXash3D install, remove it.
|
||||||
|
2. Get `xash3d-fwgs-psvita.7z` from the latest [automatic build](https://github.com/FWGS/xash3d-fwgs/releases/tag/continuous).
|
||||||
|
3. Install `xash.vpk` from the 7z archive onto your PSVita.
|
||||||
|
4. Copy the `data` directory from the 7z archive to the root of your PSVita's SD card.
|
||||||
|
5. Copy the valve folder and any other mod folders from your Half-Life install to `ux0:/data/xash3d/` (you can use other mountpoints instead of `ux0`). **Do not overwrite anything.**
|
||||||
|
|
||||||
|
### Build instructions
|
||||||
|
1. Install [VitaSDK](https://vitasdk.org/).
|
||||||
|
2. Build and install [vitaGL](https://github.com/Rinnegatamante/vitaGL):
|
||||||
|
```
|
||||||
|
git clone https://github.com/Rinnegatamante/vitaGL.git
|
||||||
|
make -C vitaGL NO_TEX_COMBINER=1 HAVE_UNFLIPPED_FBOS=1 HAVE_PTHREAD=1 SINGLE_THREADED_GC=1 MATH_SPEEDHACK=1 DRAW_SPEEDHACK=1 HAVE_CUSTOM_HEAP=1 -j2 install
|
||||||
|
```
|
||||||
|
3. Build and install [vita-rtld](https://github.com/fgsfdsfgs/vita-rtld):
|
||||||
|
```
|
||||||
|
git clone https://github.com/fgsfdsfgs/vita-rtld.git && cd vita-rtld
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||||
|
make -j2 install
|
||||||
|
```
|
||||||
|
4. Build and install [this SDL2 fork](https://github.com/Northfear/SDL) with vitaGL integration:
|
||||||
|
```
|
||||||
|
git clone https://github.com/Northfear/SDL.git && cd SDL
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake -DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DVIDEO_VITA_VGL=ON ..
|
||||||
|
make -j2 install
|
||||||
|
```
|
||||||
|
5. Use `waf`:
|
||||||
|
```
|
||||||
|
./waf configure -T release --psvita
|
||||||
|
./waf build
|
||||||
|
```
|
||||||
|
6. Copy all the resulting `.so` files into a single folder:
|
||||||
|
```
|
||||||
|
./waf install --destdir=xash3d
|
||||||
|
```
|
||||||
|
7. `xash.vpk` is located in `build/engine/`.
|
||||||
@@ -19,7 +19,22 @@
|
|||||||
- [List of XashXT-based mods](#list-of-xashxt-based-mods)
|
- [List of XashXT-based mods](#list-of-xashxt-based-mods)
|
||||||
- [List of maps for They Hunger](#list-of-maps-for-they-hunger)
|
- [List of maps for They Hunger](#list-of-maps-for-they-hunger)
|
||||||
- [List of games and mods with custom gamedll](#list-of-games-and-mods-with-custom-gamedll)
|
- [List of games and mods with custom gamedll](#list-of-games-and-mods-with-custom-gamedll)
|
||||||
- [List of mods for Counter Strike(Android only)](#list-of-mods-for-counter-strike)
|
- [List of mods for Counter Strike](#list-of-mods-for-counter-strike)
|
||||||
|
- [List of supported mods from mobile_hacks branch of HLSDK Portable by FWGS](#list-of-supported-mods-from-mobile_hacks-branch-of-hlsdk-portable-by-fwgs)
|
||||||
|
|
||||||
|
# List of supported mods from mobile_hacks branch of HLSDK Portable by FWGS
|
||||||
|
1. [Afraid of Monsters](https://www.moddb.com/mods/afraid-of-monsters/downloads/afraid-of-monsters-v1)
|
||||||
|
2. [Big Lolly](https://www.moddb.com/mods/big-lolly)
|
||||||
|
3. [Half-Life: Blue Shift](https://store.steampowered.com/app/130/HalfLife_Blue_Shift/)
|
||||||
|
4. [Half-Secret](https://www.moddb.com/mods/half-secret)
|
||||||
|
5. [Case Closed](https://www.moddb.com/mods/caseclosed)
|
||||||
|
6. [Bloody Pizza - Vendetta](https://www.moddb.com/games/half-life/addons/bloody-pizza-vendetta)
|
||||||
|
7. [Borderlands](https://www.moddb.com/games/half-life/addons/borderlands-v04)
|
||||||
|
8. [Half-Life: Induction](https://www.moddb.com/mods/half-life-induction/downloads/half-life-induction-12)
|
||||||
|
9. [Redemption/Absolute Redemption](https://www.moddb.com/mods/absolute-redemption)
|
||||||
|
10. [Sewer beta](https://www.moddb.com/games/half-life/addons/sewer-beta)
|
||||||
|
11. [Times of Troubles](https://www.moddb.com/mods/times-of-troubles)
|
||||||
|
12. [Half-Life: Urbicide](https://www.moddb.com/mods/half-life-urbicide)
|
||||||
|
|
||||||
# List of Half-Life-based mods
|
# List of Half-Life-based mods
|
||||||
Originally this list was written by *Qwertyus*(*Qortez*)
|
Originally this list was written by *Qwertyus*(*Qortez*)
|
||||||
@@ -176,7 +191,7 @@ For mappacks - place *.bsp files to **valve/maps** folder, *.wad files to **valv
|
|||||||
143. [Operation: Nova](http://www.moddb.com/mods/half-life-operation-nova) (there is an inner bug with an M60 machinegun on a map with Osprey: it can be activated and used if you are staying in front of it, not behind it)
|
143. [Operation: Nova](http://www.moddb.com/mods/half-life-operation-nova) (there is an inner bug with an M60 machinegun on a map with Osprey: it can be activated and used if you are staying in front of it, not behind it)
|
||||||
144. [Optimum Fear](https://www.fileplanet.com/7472/0/fileinfo/Optimum-Fear)
|
144. [Optimum Fear](https://www.fileplanet.com/7472/0/fileinfo/Optimum-Fear)
|
||||||
145. [Outrun](http://www.moddb.com/mods/outrun)
|
145. [Outrun](http://www.moddb.com/mods/outrun)
|
||||||
146. [Outwards (Day One)](https://drive.google.com/file/d/1mjQ8wUazYbwTq9Ocg0Vs0raq4avbTRne/view?usp=sharing)
|
146. [Outwards (Day One)](https://web.archive.org/web/20161026104825/http://visgi.info/maps/)
|
||||||
147. [Overhaul Pack](http://www.moddb.com/mods/half-life-overhaul-pack) (Just HD pack for Half-Life)
|
147. [Overhaul Pack](http://www.moddb.com/mods/half-life-overhaul-pack) (Just HD pack for Half-Life)
|
||||||
148. [P.I.Z.D.E.C.](https://www.runthinkshootlive.com/posts/pizdec/)
|
148. [P.I.Z.D.E.C.](https://www.runthinkshootlive.com/posts/pizdec/)
|
||||||
149. [pagoda](http://www.moddb.com/mods/pagoda1)
|
149. [pagoda](http://www.moddb.com/mods/pagoda1)
|
||||||
@@ -282,7 +297,7 @@ For mappacks - place *.bsp files to **valve/maps** folder, *.wad files to **valv
|
|||||||
6. [Catacombs: Part 1](https://www.runthinkshootlive.com/posts/catacombs/)
|
6. [Catacombs: Part 1](https://www.runthinkshootlive.com/posts/catacombs/)
|
||||||
7. [Cro-man's Office Mappack](http://twhl.info/vault.php?map=5547)
|
7. [Cro-man's Office Mappack](http://twhl.info/vault.php?map=5547)
|
||||||
8. [Half-Life Episode Two Demo Alpha v1.0](http://hl.loess.ru/?mod=451)
|
8. [Half-Life Episode Two Demo Alpha v1.0](http://hl.loess.ru/?mod=451)
|
||||||
9. [Hazardous-Course (first version of Hazardous-Course 2)](https://drive.google.com/file/d/16djJZSpNWKyScSxSyMqX-u_S-2i400rl/view?usp=sharing)
|
9. [Hazardous-Course (first version of Hazardous-Course 2)](https://web.archive.org/web/20110512012317/http://www.richmans-maps.ch.vu/)
|
||||||
10. [High Tech v0.2](http://hl.loess.ru/?mod=499)
|
10. [High Tech v0.2](http://hl.loess.ru/?mod=499)
|
||||||
11. [HL Shadows, Part 1](https://www.fileplanet.com/7466/0/fileinfo/'HL-Shadows',-Part-1)
|
11. [HL Shadows, Part 1](https://www.fileplanet.com/7466/0/fileinfo/'HL-Shadows',-Part-1)
|
||||||
12. [HLNewEnd](http://twhl.info/vault.php?map=2275)
|
12. [HLNewEnd](http://twhl.info/vault.php?map=2275)
|
||||||
@@ -305,11 +320,11 @@ For mappacks - place *.bsp files to **valve/maps** folder, *.wad files to **valv
|
|||||||
29. [Shortcut v1.0 Beta](https://www.runthinkshootlive.com/posts/shortcut/)
|
29. [Shortcut v1.0 Beta](https://www.runthinkshootlive.com/posts/shortcut/)
|
||||||
30. [Stoka](https://www.ceskemody.cz/mapy.php?lng=1&clanek=222&razeni_hra=1&pn=stoka)
|
30. [Stoka](https://www.ceskemody.cz/mapy.php?lng=1&clanek=222&razeni_hra=1&pn=stoka)
|
||||||
31. [Striker's Compo 26](http://twhl.info/vault.php?map=5190) (buggy)
|
31. [Striker's Compo 26](http://twhl.info/vault.php?map=5190) (buggy)
|
||||||
32. [Technology Test 2](https://drive.google.com/file/d/1LfldzsMIN5j07bgtNkfY5v0Xl0S9de_G/view?usp=sharing)
|
32. [Technology Test 2](https://web.archive.org/web/20110512012317/http://www.richmans-maps.ch.vu/)
|
||||||
33. [The Gate Playable Demo](https://www.fileplanet.com/116347/110000/fileinfo/The-Gate-Playable-Demo)
|
33. [The Gate Playable Demo](https://www.fileplanet.com/116347/110000/fileinfo/The-Gate-Playable-Demo)
|
||||||
34. [They are Back](https://www.runthinkshootlive.com/posts/they-are-back/)
|
34. [They are Back](https://www.runthinkshootlive.com/posts/they-are-back/)
|
||||||
35. [Tiefseelabor( Deep Sea Laboratory )](https://www.runthinkshootlive.com/posts/deep-sea-laboratory/)
|
35. [Tiefseelabor( Deep Sea Laboratory )](https://www.runthinkshootlive.com/posts/deep-sea-laboratory/)
|
||||||
36. [Time-Shift](https://drive.google.com/file/d/1pK1s-2SIlSMQHVRPMLdC_94wTa__8_DX/view?usp=sharing)
|
36. [Time-Shift](https://web.archive.org/web/20110512012317/http://www.richmans-maps.ch.vu/)
|
||||||
37. [Train Single Beta](https://cs-mapping.com.ua/forum/showthread.php?t=36394) (Remove **gfx.wad** from **TrainSingle** folder)
|
37. [Train Single Beta](https://cs-mapping.com.ua/forum/showthread.php?t=36394) (Remove **gfx.wad** from **TrainSingle** folder)
|
||||||
38. [WAR: The Killer Beta 0.1](http://www.moddb.com/mods/war)
|
38. [WAR: The Killer Beta 0.1](http://www.moddb.com/mods/war)
|
||||||
39. [White Force Beta( Residual Point prototype )](http://www.moddb.com/mods/hl-residual-point/downloads/white-force-beta-2002)
|
39. [White Force Beta( Residual Point prototype )](http://www.moddb.com/mods/hl-residual-point/downloads/white-force-beta-2002)
|
||||||
@@ -379,7 +394,7 @@ Mods:
|
|||||||
5. [Half-Life Baby v1.4](http://www.moddb.com/games/half-life/addons/half-life-baby) (it's an unfinished but playable mod; after installing of the mod open **liblist.gam** or **gameinfo.txt** file in the mod's folder and correct the line **gamedll "..\hlbaby\dlls\hl.dll"** for **gamedll "dlls\hl.dll"**, otherwise you'll not be able to start a game)
|
5. [Half-Life Baby v1.4](http://www.moddb.com/games/half-life/addons/half-life-baby) (it's an unfinished but playable mod; after installing of the mod open **liblist.gam** or **gameinfo.txt** file in the mod's folder and correct the line **gamedll "..\hlbaby\dlls\hl.dll"** for **gamedll "dlls\hl.dll"**, otherwise you'll not be able to start a game)
|
||||||
6. [Half-Secret](http://www.moddb.com/mods/half-secret) (this mod has custom **weapon_snark** code)
|
6. [Half-Secret](http://www.moddb.com/mods/half-secret) (this mod has custom **weapon_snark** code)
|
||||||
7. [Induction](http://www.moddb.com/mods/half-life-induction) (this mod has new item - **item_flashlight**)
|
7. [Induction](http://www.moddb.com/mods/half-life-induction) (this mod has new item - **item_flashlight**)
|
||||||
8. [Lost in Black Mesa(first version without HLFX)](https://drive.google.com/file/d/1bEnm_AxJs-ly8hTEZIQBw_v2BsXdSiGa/view?usp=sharing)
|
8. [Lost in Black Mesa(first version without HLFX)](https://web.archive.org/web/20160407041812/http://half-life.ru/forum/showthread.php?threadid=13959) (download links dead!)
|
||||||
9. [Soldier](http://www.moddb.com/mods/half-life-soldier)
|
9. [Soldier](http://www.moddb.com/mods/half-life-soldier)
|
||||||
10. [Solo Operations](http://www.moddb.com/mods/solo-operations)
|
10. [Solo Operations](http://www.moddb.com/mods/solo-operations)
|
||||||
11. [The Blood v1.1](http://hl.loess.ru/?mods=&search=The+Blood) (there are some inner bugs in the mod, but they don't interfere with a game progress)
|
11. [The Blood v1.1](http://hl.loess.ru/?mods=&search=The+Blood) (there are some inner bugs in the mod, but they don't interfere with a game progress)
|
||||||
@@ -440,7 +455,7 @@ Mods:
|
|||||||
51. [Data-base](https://www.runthinkshootlive.com/posts/database/)
|
51. [Data-base](https://www.runthinkshootlive.com/posts/database/)
|
||||||
52. [de_dust2_azabetfeN](https://cs-mapping.com.ua/forum/showthread.php?t=36394) (remove **cl_dlls** & **dlls** folders from inside of mod's directory before you start the game)
|
52. [de_dust2_azabetfeN](https://cs-mapping.com.ua/forum/showthread.php?t=36394) (remove **cl_dlls** & **dlls** folders from inside of mod's directory before you start the game)
|
||||||
53. [De-railed](http://twhl.info/competitions.php?results=7)
|
53. [De-railed](http://twhl.info/competitions.php?results=7)
|
||||||
54. [Dead Shift Beta](http://www.moddb.com/mods/dead-shift) - [Demo 1](https://www.gamewatcher.com/mods/half-life-mod/dead-shift-1-0-beta) & [Demo 2](https://drive.google.com/file/d/1uHvr8xONogTTNOy-8X6G4ehFV6Eawvbq/view?usp=sharing)
|
54. [Dead Shift Beta](http://www.moddb.com/mods/dead-shift) - [Demo 1](https://www.gamewatcher.com/mods/half-life-mod/dead-shift-1-0-beta) & [Demo 2](https://web.archive.org/web/20151030005310/http://www.gamefront.com/files/13532512)
|
||||||
55. [Deep](http://twhl.info/vault.php?map=1669)
|
55. [Deep](http://twhl.info/vault.php?map=1669)
|
||||||
56. [Desert Attack](http://fyzzer.narod.ru/index.html)
|
56. [Desert Attack](http://fyzzer.narod.ru/index.html)
|
||||||
57. [Desert Combat Demo](https://www.fileplanet.com/190487/190000/fileinfo/Half-Life---Desert-Combat-Mod) (despite a big file size there's only one small unfinished map)
|
57. [Desert Combat Demo](https://www.fileplanet.com/190487/190000/fileinfo/Half-Life---Desert-Combat-Mod) (despite a big file size there's only one small unfinished map)
|
||||||
@@ -498,8 +513,8 @@ Mods:
|
|||||||
109. [Hospital](https://gamebanana.com/maps/167446) (you need to edit **liblist.gam** file in the mod's folder - delete *gamedll & type* strings from it before you start to play)
|
109. [Hospital](https://gamebanana.com/maps/167446) (you need to edit **liblist.gam** file in the mod's folder - delete *gamedll & type* strings from it before you start to play)
|
||||||
110. [Hostage](https://www.runthinkshootlive.com/posts/hostage-2/)
|
110. [Hostage](https://www.runthinkshootlive.com/posts/hostage-2/)
|
||||||
111. [House](http://www.artpeter.net/Data/HalfLife/Hl.php)
|
111. [House](http://www.artpeter.net/Data/HalfLife/Hl.php)
|
||||||
112. [Impulse 101 Fun - The Train](https://drive.google.com/file/d/1jAuMCCmREH0mfAEAscqaG8FQGa2uNknb/view?usp=sharing) (map from *TWHL* by *Archie* aka *The Hunter*)
|
112. [Impulse 101 Fun - The Train](http://web.archive.org/web/20070305075816/http://www.twhl.co.za/mapvault/2817.zip) (map from *TWHL* by *Archie* aka *The Hunter*)
|
||||||
113. [In America](https://drive.google.com/file/d/1gOC8zfnUvBxRy8Rr8juNiUNbLYjoZpnn/view?usp=sharing)
|
113. [In America](https://web.archive.org/web/20170221213409/http://www.lambda-force.org/load/half_life/karty/half_life_in_america/18-1-0-476)
|
||||||
114. [In the Kitchen](http://twhl.info/vault.php?map=4314)
|
114. [In the Kitchen](http://twhl.info/vault.php?map=4314)
|
||||||
115. [Infiltration](https://www.fileplanet.com/7467/0/fileinfo/Infiltration)
|
115. [Infiltration](https://www.fileplanet.com/7467/0/fileinfo/Infiltration)
|
||||||
116. [Interactivity & Lots of Entities](http://twhl.info/vault.php?map=5744) (link dead!)
|
116. [Interactivity & Lots of Entities](http://twhl.info/vault.php?map=5744) (link dead!)
|
||||||
|
|||||||
104
README.md
104
README.md
@@ -1,59 +1,55 @@
|
|||||||
# Xash3D FWGS Engine
|
# Xash3D FWGS Engine <img align="right" width="128" height="128" src="https://github.com/FWGS/xash3d-fwgs/raw/master/game_launch/icon-xash-material.png" alt="Xash3D FWGS icon" />
|
||||||
[](https://github.com/FWGS/xash3d-fwgs/actions/workflows/c-cpp.yml) [](https://cirrus-ci.com/github/FWGS/xash3d-fwgs) [](http://fwgsdiscord.mentality.rip/) \
|
[](https://builds.sr.ht/~a1batross/xash3d-fwgs?) [](https://github.com/FWGS/xash3d-fwgs/actions/workflows/c-cpp.yml) [](https://cirrus-ci.com/github/FWGS/xash3d-fwgs) [](http://fwgsdiscord.mentality.rip/) \
|
||||||
[](https://github.com/FWGS/xash3d-fwgs/releases/latest) [](https://github.com/FWGS/xash3d-fwgs/releases/tag/continuous)
|
[](https://github.com/FWGS/xash3d-fwgs/releases/latest) [](https://github.com/FWGS/xash3d-fwgs/releases/tag/continuous)
|
||||||
|
|
||||||
Xash3D FWGS is a fork of Xash3D Engine by Unkle Mike with extended features and crossplatform.
|
Xash3D (pronounced `[ksɑʂ]`) FWGS is a game engine, aimed to provide compatibility with Half-Life Engine and extend it, as well as to give game developers well known workflow.
|
||||||
|
|
||||||
```
|
Xash3D FWGS is a heavily modified fork of an original [Xash3D Engine](https://www.moddb.com/engines/xash3d-engine) by Unkle Mike.
|
||||||
Xash3D is a game engine, aimed to provide compatibility with Half-Life Engine,
|
|
||||||
as well as to give game developers well known workflow and extend it.
|
## Donate
|
||||||
Read more about Xash3D on ModDB: https://www.moddb.com/engines/xash3d-engine
|
[](Documentation/donate.md) \
|
||||||
```
|
If you like Xash3D FWGS, consider supporting individual engine maintainers. By supporting us, you help to continue developing this game engine further. The sponsorship links are available in [documentation](Documentation/donate.md).
|
||||||
|
|
||||||
## Fork features
|
## Fork features
|
||||||
* HLSDK 2.4 support.
|
* Steam Half-Life (HLSDK 2.5) support.
|
||||||
* Crossplatform: supported x86 and ARM on Windows/Linux/BSD/Android. ([see docs for more info](Documentation/ports.md))
|
* Crossplatform and modern compilers support: supports Windows, Linux, BSD & Android on x86 & ARM and [many more](Documentation/ports.md).
|
||||||
* Modern compilers support: say no more to MSVC6.
|
* Better multiplayer: multiple master servers, headless dedicated server, voice chat, [GoldSrc protocol support](Documentation/goldsrc-protocol-support.md) and IPv6 support.
|
||||||
* Better multiplayer support: multiple master servers, headless dedicated server.
|
* Multiple renderers support: OpenGL, GLESv1, GLESv2 and Software.
|
||||||
* Mobility API: allows better game integration on mobile devices(vibration, touch controls)
|
* Advanced virtual filesystem: `.pk3` and `.pk3dir` support, compatibility with GoldSrc FS module, fast case-insensitivity emulation for crossplatform.
|
||||||
* Different input methods: touch, gamepad and classic mouse & keyboard.
|
* Mobility API: better game integration on mobile devices (vibration, touch controls).
|
||||||
|
* Different input methods: touch and gamepad in addition to mouse & keyboard.
|
||||||
* TrueType font rendering, as a part of mainui_cpp.
|
* TrueType font rendering, as a part of mainui_cpp.
|
||||||
* Multiple renderers support: OpenGL, GLESv1, GLESv2, Software
|
* External VGUI support module.
|
||||||
* A set of small improvements, without broken compatibility.
|
* PNG & KTX2 image format support.
|
||||||
|
* [A set of small improvements](Documentation/), without broken compatibility.
|
||||||
## Planned fork features
|
|
||||||
* Virtual Reality support and game API
|
|
||||||
* Voice support
|
|
||||||
* Vulkan renderer
|
|
||||||
|
|
||||||
## Installation & Running
|
## Installation & Running
|
||||||
0) Get Xash3D FWGS binaries: you can use [testing](https://github.com/FWGS/xash3d-fwgs/releases/tag/continuous) build or you can compile engine from source code.
|
0) Get Xash3D FWGS binaries: you can use [testing](https://github.com/FWGS/xash3d-fwgs/releases/tag/continuous) build or you can compile engine from source code.
|
||||||
1) Copy engine binaries to some directory.
|
1) Copy engine binaries to some directory.
|
||||||
2) Copy `valve` directory from [Half-Life](https://store.steampowered.com/app/70/HalfLife/) to directory with engine binaries.
|
2) Copy `valve` directory from [Half-Life](https://store.steampowered.com/app/70/HalfLife/) to directory with engine binaries.
|
||||||
If your CPU is NOT x86 compatible or you're running 64-bit version of the engine, you may want to compile [Half-Life SDK](https://github.com/FWGS/hlsdk-xash3d).
|
If your CPU is NOT x86 compatible or you're running 64-bit version of the engine, you may want to compile [Half-Life SDK](https://github.com/FWGS/hlsdk-portable).
|
||||||
This repository contains our fork of HLSDK and restored source code for some of the mods. Not all of them, of course.
|
This repository contains our fork of HLSDK and restored source code for Half-Life expansions and some mods.
|
||||||
You still needed to copy `valve` directory as all game resources located there.
|
You still needed to copy `valve` directory as all game resources located there.
|
||||||
3) Run the main executable (`xash3d.exe` or AppImage).
|
3) Run the main executable (`xash3d.exe` or AppImage).
|
||||||
|
|
||||||
For additional info, run Xash3D with `-help` command line key.
|
For additional info, run Xash3D with `-help` command line key.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
* Before sending an issue, check if someone already reported your issue. Make sure you're following "How To Ask Questions The Smart Way" guide by Eric Steven Raymond. Read more: http://www.catb.org/~esr/faqs/smart-questions.html
|
* Before sending an issue, check if someone already reported your issue. Make sure you're following "How To Ask Questions The Smart Way" guide by Eric Steven Raymond. Read more: http://www.catb.org/~esr/faqs/smart-questions.html.
|
||||||
* Issues are accepted in both English and Russian
|
* Issues are accepted in both English and Russian.
|
||||||
* Before sending a PR, check if you followed our contribution guide in CONTRIBUTING.md file.
|
* Before sending a PR, check if you followed our contribution guide in CONTRIBUTING.md file.
|
||||||
|
|
||||||
## Build instructions
|
## Build instructions
|
||||||
We are using Waf build system. If you have some Waf-related questions, I recommend you to read https://waf.io/book/
|
We are using Waf build system. If you have some Waf-related questions, I recommend you to read [Waf Book](https://waf.io/book/).
|
||||||
|
|
||||||
NOTE: NEVER USE GitHub's ZIP ARCHIVES. GitHub doesn't include external dependencies we're using!
|
NOTE: NEVER USE GitHub's ZIP ARCHIVES. GitHub doesn't include external dependencies we're using!
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
If your CPU is x86 compatible and you're on Windows or Linux, we are building 32-bit code by default. This was done to maintain compatibility with Steam releases of Half-Life and based on it's engine games.
|
||||||
If your CPU is x86 compatible, we are building 32-bit code by default. This was dont for keeping compatibility with Steam releases of Half-Life and based on it's engine games.
|
|
||||||
Even if Xash3D FWGS does support targetting 64-bit, you can't load games without recompiling them from source code!
|
Even if Xash3D FWGS does support targetting 64-bit, you can't load games without recompiling them from source code!
|
||||||
|
|
||||||
If your CPU is NOT x86 compatible or you decided build 64-bit version of engine, you may want to compile [Half-Life SDK](https://github.com/FWGS/hlsdk-xash3d).
|
If your CPU is NOT x86 compatible or you decided build 64-bit version of engine, you may want to compile [Half-Life SDK](https://github.com/FWGS/hlsdk-portable).
|
||||||
This repository contains our fork of HLSDK and restored source code for some of the mods. Not all of them, of course.
|
This repository contains our fork of HLSDK and restored source code for Half-Life expansions and some mods.
|
||||||
|
|
||||||
#### Windows (Visual Studio)
|
#### Windows (Visual Studio)
|
||||||
* Install Visual Studio.
|
* Install Visual Studio.
|
||||||
@@ -65,31 +61,39 @@ This repository contains our fork of HLSDK and restored source code for some of
|
|||||||
|
|
||||||
#### GNU/Linux
|
#### GNU/Linux
|
||||||
##### Debian/Ubuntu
|
##### Debian/Ubuntu
|
||||||
* Enable i386 on your system, if you're compiling 32-bit engine on amd64. If not, skip this
|
* For 32-bit engine on 64-bit x86 operating system:
|
||||||
|
* Enable i386 on your system: `$ sudo dpkg --add-architecture i386`.
|
||||||
|
* Install development tools: `$ sudo apt install build-essential gcc-multilib g++-multilib python libsdl2-dev:i386 libfontconfig-dev:i386 libfreetype6-dev:i386 libopus-dev:i386 libbz2-dev:i386`.
|
||||||
|
* Set PKG_CONFIG_PATH environment variable to point at 32-bit libraries: `$ export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig`.
|
||||||
|
|
||||||
`$ sudo dpkg --add-architecture i386`
|
* For non-x86 systems:
|
||||||
* Install development tools
|
* Install development tools: `$ sudo apt install build-essential python libsdl2-dev libfontconfig-dev libfreetype6-dev libopus-dev libbz2-dev`.
|
||||||
* For 32-bit engine on amd64: \
|
|
||||||
`$ sudo apt install build-essential gcc-multilib g++-multilib python libsdl2-dev:i386 libfontconfig-dev:i386 libfreetype6-dev:i386`
|
* Clone this repostory: `$ git clone --recursive https://github.com/FWGS/xash3d-fwgs`.
|
||||||
* For everything else: \
|
|
||||||
`$ sudo apt install build-essential python libsdl2-dev libfontconfig-dev libfreetype6-dev`
|
##### RedHat/Fedora
|
||||||
* Clone this repostory:
|
* For 32-bit engine on 64-bit x86 operating system:
|
||||||
`$ git clone --recursive https://github.com/FWGS/xash3d-fwgs`
|
* Install development tools: `$ sudo dnf install gcc gcc-c++ glibc-devel.i686 SDL2-devel.i686 opus-devel.i686 fontconfig-devel.i686 freetype-devel.i686 bzip2-devel.i686`.
|
||||||
|
* Set PKG_CONFIG_PATH environment variable to point at 32-bit libraries: `$ export PKG_CONFIG_PATH=/usr/lib/pkgconfig`.
|
||||||
|
|
||||||
|
* For non-x86 systems:
|
||||||
|
* Install development tools: `$ sudo dnf install gcc gcc-c++ SDL2-devel opus-devel fontconfig-devel freetype-devel bzip2-devel`.
|
||||||
|
|
||||||
|
* Clone this repostory: `$ git clone --recursive https://github.com/FWGS/xash3d-fwgs`.
|
||||||
|
|
||||||
### Building
|
### Building
|
||||||
#### Windows (Visual Studio)
|
#### Windows (Visual Studio)
|
||||||
0) Open command line
|
0) Open command line.
|
||||||
1) Navigate to `xash3d-fwgs` directory.
|
1) Navigate to `xash3d-fwgs` directory.
|
||||||
2) Carefully examine which build options are available: `waf --help`
|
2) (optional) Examine which build options are available: `waf --help`.
|
||||||
3) Configure build: `waf configure -T release --sdl2=c:/path/to/SDL2`
|
3) Configure build: `waf configure --sdl2=c:/path/to/SDL2`.
|
||||||
4) Compile: `waf build`
|
4) Compile: `waf build`.
|
||||||
5) Install: `waf install --destdir=c:/path/to/any/output/directory`
|
5) Install: `waf install --destdir=c:/path/to/any/output/directory`.
|
||||||
|
|
||||||
#### Linux
|
#### Linux
|
||||||
If compiling 32-bit on amd64, you may need to supply `export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig` prior to running configure.
|
If compiling 32-bit on amd64, make sure `PKG_CONFIG_PATH` from the previous step is set correctly, prior to running configure.
|
||||||
|
|
||||||
0) Examine which build options are available: `./waf --help`
|
0) (optional) Examine which build options are available: `./waf --help`.
|
||||||
1) Configure build: `./waf configure -T release`
|
1) Configure build: `./waf configure` (you need to pass `-8` to compile 64-bit engine on 64-bit x86 processor).
|
||||||
(You need to pass `-8` to compile 64-bit engine on 64-bit x86 processor)
|
2) Compile: `./waf build`.
|
||||||
2) Compile: `./waf build`
|
3) Install: `./waf install --destdir=/path/to/any/output/directory`.
|
||||||
3) Install(optional): `./waf install --destdir=/path/to/any/output/directory`
|
|
||||||
|
|||||||
@@ -18,27 +18,17 @@ GNU General Public License for more details.
|
|||||||
// video backends (XASH_VIDEO)
|
// video backends (XASH_VIDEO)
|
||||||
#define VIDEO_NULL 0
|
#define VIDEO_NULL 0
|
||||||
#define VIDEO_SDL 1
|
#define VIDEO_SDL 1
|
||||||
#define VIDEO_ANDROID 2
|
|
||||||
#define VIDEO_FBDEV 3
|
#define VIDEO_FBDEV 3
|
||||||
#define VIDEO_DOS 4
|
#define VIDEO_DOS 4
|
||||||
|
|
||||||
|
|
||||||
// audio backends (XASH_SOUND)
|
// audio backends (XASH_SOUND)
|
||||||
#define SOUND_NULL 0
|
#define SOUND_NULL 0
|
||||||
#define SOUND_SDL 1
|
#define SOUND_SDL 1
|
||||||
#define SOUND_OPENSLES 2
|
|
||||||
#define SOUND_ALSA 3
|
#define SOUND_ALSA 3
|
||||||
|
|
||||||
// crash handler (XASH_CRASHHANDLER)
|
|
||||||
#define CRASHHANDLER_NULL 0
|
|
||||||
#define CRASHHANDLER_UCONTEXT 1
|
|
||||||
#define CRASHHANDLER_DBGHELP 2
|
|
||||||
#define CRASHHANDLER_WIN32 3
|
|
||||||
|
|
||||||
// input (XASH_INPUT)
|
// input (XASH_INPUT)
|
||||||
#define INPUT_NULL 0
|
#define INPUT_NULL 0
|
||||||
#define INPUT_SDL 1
|
#define INPUT_SDL 1
|
||||||
#define INPUT_ANDROID 2
|
|
||||||
#define INPUT_EVDEV 3
|
#define INPUT_EVDEV 3
|
||||||
|
|
||||||
// timer (XASH_TIMER)
|
// timer (XASH_TIMER)
|
||||||
@@ -51,9 +41,8 @@ GNU General Public License for more details.
|
|||||||
// messageboxes (XASH_MESSAGEBOX)
|
// messageboxes (XASH_MESSAGEBOX)
|
||||||
#define MSGBOX_STDERR 0
|
#define MSGBOX_STDERR 0
|
||||||
#define MSGBOX_SDL 1
|
#define MSGBOX_SDL 1
|
||||||
#define MSGBOX_ANDROID 2
|
|
||||||
#define MSGBOX_WIN32 3
|
#define MSGBOX_WIN32 3
|
||||||
|
#define MSGBOX_NSWITCH 4
|
||||||
|
|
||||||
// library loading (XASH_LIB)
|
// library loading (XASH_LIB)
|
||||||
#define LIB_NULL 0
|
#define LIB_NULL 0
|
||||||
@@ -61,5 +50,4 @@ GNU General Public License for more details.
|
|||||||
#define LIB_WIN32 2
|
#define LIB_WIN32 2
|
||||||
#define LIB_STATIC 3
|
#define LIB_STATIC 3
|
||||||
|
|
||||||
|
|
||||||
#endif /* BACKENDS_H */
|
#endif /* BACKENDS_H */
|
||||||
|
|||||||
@@ -61,13 +61,16 @@ BRUSH MODELS
|
|||||||
#define LS_UNUSED 0xFE
|
#define LS_UNUSED 0xFE
|
||||||
#define LS_NONE 0xFF
|
#define LS_NONE 0xFF
|
||||||
|
|
||||||
|
#define MAX_MAP_CLIPNODES_HLBSP 32767
|
||||||
|
#define MAX_MAP_CLIPNODES_BSP2 524288
|
||||||
|
|
||||||
// these limis not using by modelloader but only for displaying 'mapstats' correctly
|
// these limis not using by modelloader but only for displaying 'mapstats' correctly
|
||||||
#ifdef SUPPORT_BSP2_FORMAT
|
#ifdef SUPPORT_BSP2_FORMAT
|
||||||
#define MAX_MAP_MODELS 2048 // embedded models
|
#define MAX_MAP_MODELS 2048 // embedded models
|
||||||
#define MAX_MAP_ENTSTRING 0x200000 // 2 Mb should be enough
|
#define MAX_MAP_ENTSTRING 0x200000 // 2 Mb should be enough
|
||||||
#define MAX_MAP_PLANES 131072 // can be increased without problems
|
#define MAX_MAP_PLANES 131072 // can be increased without problems
|
||||||
#define MAX_MAP_NODES 262144 // can be increased without problems
|
#define MAX_MAP_NODES 262144 // can be increased without problems
|
||||||
#define MAX_MAP_CLIPNODES 524288 // can be increased without problems
|
#define MAX_MAP_CLIPNODES MAX_MAP_CLIPNODES_BSP2 // can be increased without problems
|
||||||
#define MAX_MAP_LEAFS 131072 // CRITICAL STUFF to run ad_sepulcher!!!
|
#define MAX_MAP_LEAFS 131072 // CRITICAL STUFF to run ad_sepulcher!!!
|
||||||
#define MAX_MAP_VERTS 524288 // can be increased without problems
|
#define MAX_MAP_VERTS 524288 // can be increased without problems
|
||||||
#define MAX_MAP_FACES 262144 // can be increased without problems
|
#define MAX_MAP_FACES 262144 // can be increased without problems
|
||||||
@@ -78,7 +81,7 @@ BRUSH MODELS
|
|||||||
#define MAX_MAP_ENTSTRING 0x100000 // 1 Mb should be enough
|
#define MAX_MAP_ENTSTRING 0x100000 // 1 Mb should be enough
|
||||||
#define MAX_MAP_PLANES 65536 // can be increased without problems
|
#define MAX_MAP_PLANES 65536 // can be increased without problems
|
||||||
#define MAX_MAP_NODES 32767 // because negative shorts are leafs
|
#define MAX_MAP_NODES 32767 // because negative shorts are leafs
|
||||||
#define MAX_MAP_CLIPNODES 32767 // because negative shorts are contents
|
#define MAX_MAP_CLIPNODES MAX_MAP_CLIPNODES_HLBSP // because negative shorts are contents
|
||||||
#define MAX_MAP_LEAFS 32767 // signed short limit
|
#define MAX_MAP_LEAFS 32767 // signed short limit
|
||||||
#define MAX_MAP_VERTS 65535 // unsigned short limit
|
#define MAX_MAP_VERTS 65535 // unsigned short limit
|
||||||
#define MAX_MAP_FACES 65535 // unsigned short limit
|
#define MAX_MAP_FACES 65535 // unsigned short limit
|
||||||
|
|||||||
@@ -9,7 +9,20 @@ NOTE: number at end of pixelformat name it's a total bitscount e.g. PF_RGB_24 ==
|
|||||||
========================================================================
|
========================================================================
|
||||||
*/
|
*/
|
||||||
#define ImageRAW( type ) (type == PF_RGBA_32 || type == PF_BGRA_32 || type == PF_RGB_24 || type == PF_BGR_24 || type == PF_LUMINANCE)
|
#define ImageRAW( type ) (type == PF_RGBA_32 || type == PF_BGRA_32 || type == PF_RGB_24 || type == PF_BGR_24 || type == PF_LUMINANCE)
|
||||||
#define ImageDXT( type ) (type == PF_DXT1 || type == PF_DXT3 || type == PF_DXT5 || type == PF_ATI2 || type == PF_BC6H_SIGNED || type == PF_BC6H_UNSIGNED || type == PF_BC7)
|
#define ImageCompressed( type ) \
|
||||||
|
( type == PF_DXT1 \
|
||||||
|
|| type == PF_DXT3 \
|
||||||
|
|| type == PF_DXT5 \
|
||||||
|
|| type == PF_ATI2 \
|
||||||
|
|| type == PF_BC4_SIGNED \
|
||||||
|
|| type == PF_BC4_UNSIGNED \
|
||||||
|
|| type == PF_BC5_SIGNED \
|
||||||
|
|| type == PF_BC5_UNSIGNED \
|
||||||
|
|| type == PF_BC6H_SIGNED \
|
||||||
|
|| type == PF_BC6H_UNSIGNED \
|
||||||
|
|| type == PF_BC7_UNORM \
|
||||||
|
|| type == PF_BC7_SRGB \
|
||||||
|
|| type == PF_KTX2_RAW )
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
@@ -25,9 +38,15 @@ typedef enum
|
|||||||
PF_DXT3, // s3tc DXT3/BC2 format
|
PF_DXT3, // s3tc DXT3/BC2 format
|
||||||
PF_DXT5, // s3tc DXT5/BC3 format
|
PF_DXT5, // s3tc DXT5/BC3 format
|
||||||
PF_ATI2, // latc ATI2N/BC5 format
|
PF_ATI2, // latc ATI2N/BC5 format
|
||||||
|
PF_BC4_SIGNED,
|
||||||
|
PF_BC4_UNSIGNED,
|
||||||
|
PF_BC5_SIGNED,
|
||||||
|
PF_BC5_UNSIGNED,
|
||||||
PF_BC6H_SIGNED, // bptc BC6H signed FP16 format
|
PF_BC6H_SIGNED, // bptc BC6H signed FP16 format
|
||||||
PF_BC6H_UNSIGNED, // bptc BC6H unsigned FP16 format
|
PF_BC6H_UNSIGNED, // bptc BC6H unsigned FP16 format
|
||||||
PF_BC7, // bptc BC7 format
|
PF_BC7_UNORM, // bptc BC7 format
|
||||||
|
PF_BC7_SRGB,
|
||||||
|
PF_KTX2_RAW, // Raw KTX2 data, used for yet unsupported KTX2 subformats
|
||||||
PF_TOTALCOUNT, // must be last
|
PF_TOTALCOUNT, // must be last
|
||||||
} pixformat_t;
|
} pixformat_t;
|
||||||
|
|
||||||
@@ -49,6 +68,8 @@ typedef enum
|
|||||||
IL_DDS_HARDWARE = BIT(4), // DXT compression is support
|
IL_DDS_HARDWARE = BIT(4), // DXT compression is support
|
||||||
IL_LOAD_DECAL = BIT(5), // special mode for load gradient decals
|
IL_LOAD_DECAL = BIT(5), // special mode for load gradient decals
|
||||||
IL_OVERVIEW = BIT(6), // overview required some unque operations
|
IL_OVERVIEW = BIT(6), // overview required some unque operations
|
||||||
|
IL_LOAD_PLAYER_DECAL = BIT(7), // special mode for player decals
|
||||||
|
IL_KTX2_RAW = BIT(8), // renderer can consume raw KTX2 files (e.g. ref_vk)
|
||||||
} ilFlags_t;
|
} ilFlags_t;
|
||||||
|
|
||||||
// goes into rgbdata_t->encode
|
// goes into rgbdata_t->encode
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ typedef struct
|
|||||||
|
|
||||||
vec3_t mins, maxs; // terrain bounds (fill by user)
|
vec3_t mins, maxs; // terrain bounds (fill by user)
|
||||||
|
|
||||||
int reserved[32]; // just for future expansions or mod-makers
|
intptr_t reserved[32]; // just for future expansions or mod-makers
|
||||||
} mfaceinfo_t;
|
} mfaceinfo_t;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
@@ -127,14 +127,23 @@ typedef struct
|
|||||||
int flags; // sky or slime, no lightmap or 256 subdivision
|
int flags; // sky or slime, no lightmap or 256 subdivision
|
||||||
} mtexinfo_t;
|
} mtexinfo_t;
|
||||||
|
|
||||||
typedef struct glpoly_s
|
// a1ba: changed size to avoid undefined behavior. Check your allocations if you take this header!
|
||||||
|
// For example:
|
||||||
|
// before: malloc( sizeof( glpoly_t ) + ( numverts - 4 ) * VERTEXSIZE * sizeof( float ))
|
||||||
|
// after (C): malloc( sizeof( glpoly_t ) + numverts * VERTEXSIZE * sizeof( float ))
|
||||||
|
// after (C++): malloc( sizeof( glpoly_t ) + ( numverts - 1 ) * VERTEXSIZE * sizeof( float ))
|
||||||
|
typedef struct glpoly2_s
|
||||||
{
|
{
|
||||||
struct glpoly_s *next;
|
struct glpoly2_s *next;
|
||||||
struct glpoly_s *chain;
|
struct glpoly2_s *chain;
|
||||||
int numverts;
|
int numverts;
|
||||||
int flags; // for SURF_UNDERWATER
|
int flags; // for SURF_UNDERWATER
|
||||||
float verts[4][VERTEXSIZE]; // variable sized (xyz s1t1 s2t2)
|
#ifdef __cplusplus
|
||||||
} glpoly_t;
|
float verts[1][VERTEXSIZE]; // variable sized (xyz s1t1 s2t2)
|
||||||
|
#else
|
||||||
|
float verts[][VERTEXSIZE]; // variable sized (xyz s1t1 s2t2)
|
||||||
|
#endif
|
||||||
|
} glpoly2_t;
|
||||||
|
|
||||||
typedef struct mnode_s
|
typedef struct mnode_s
|
||||||
{
|
{
|
||||||
@@ -173,8 +182,8 @@ struct decal_s
|
|||||||
short entityIndex; // Entity this is attached to
|
short entityIndex; // Entity this is attached to
|
||||||
// Xash3D specific
|
// Xash3D specific
|
||||||
vec3_t position; // location of the decal center in world space.
|
vec3_t position; // location of the decal center in world space.
|
||||||
glpoly_t *polys; // precomputed decal vertices
|
glpoly2_t *polys; // precomputed decal vertices
|
||||||
int reserved[4]; // just for future expansions or mod-makers
|
intptr_t reserved[4]; // just for future expansions or mod-makers
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct mleaf_s
|
typedef struct mleaf_s
|
||||||
@@ -228,7 +237,7 @@ typedef struct mextrasurf_s
|
|||||||
unsigned short numverts; // world->vertexes[]
|
unsigned short numverts; // world->vertexes[]
|
||||||
int firstvertex; // fisrt look up in tr.tbn_vectors[], then acess to world->vertexes[]
|
int firstvertex; // fisrt look up in tr.tbn_vectors[], then acess to world->vertexes[]
|
||||||
|
|
||||||
int reserved[32]; // just for future expansions or mod-makers
|
intptr_t reserved[32]; // just for future expansions or mod-makers
|
||||||
} mextrasurf_t;
|
} mextrasurf_t;
|
||||||
|
|
||||||
struct msurface_s
|
struct msurface_s
|
||||||
@@ -246,7 +255,7 @@ struct msurface_s
|
|||||||
|
|
||||||
int light_s, light_t; // gl lightmap coordinates
|
int light_s, light_t; // gl lightmap coordinates
|
||||||
|
|
||||||
glpoly_t *polys; // multiple if warped
|
glpoly2_t *polys; // multiple if warped
|
||||||
struct msurface_s *texturechain;
|
struct msurface_s *texturechain;
|
||||||
|
|
||||||
mtexinfo_t *texinfo;
|
mtexinfo_t *texinfo;
|
||||||
@@ -488,7 +497,8 @@ typedef struct
|
|||||||
int flags;
|
int flags;
|
||||||
float size;
|
float size;
|
||||||
|
|
||||||
int reserved[8]; // VBO offsets
|
const trivertex_t **pposeverts; // only valid during loading, used to build GL mesh
|
||||||
|
intptr_t reserved[7]; // VBO offsets
|
||||||
|
|
||||||
int numposes;
|
int numposes;
|
||||||
int poseverts;
|
int poseverts;
|
||||||
@@ -531,8 +541,10 @@ typedef struct
|
|||||||
#define MAX_MOVIES 8
|
#define MAX_MOVIES 8
|
||||||
#define MAX_CDTRACKS 32
|
#define MAX_CDTRACKS 32
|
||||||
#define MAX_CLIENT_SPRITES 512 // SpriteTextures (0-256 hud, 256-512 client)
|
#define MAX_CLIENT_SPRITES 512 // SpriteTextures (0-256 hud, 256-512 client)
|
||||||
#define MAX_EFRAGS 8192 // Arcane Dimensions required
|
|
||||||
#define MAX_REQUESTS 64
|
#define MAX_REQUESTS 64
|
||||||
|
|
||||||
|
STATIC_CHECK_SIZEOF( mextrasurf_t, 324, 496 );
|
||||||
|
STATIC_CHECK_SIZEOF( decal_t, 60, 88 );
|
||||||
|
STATIC_CHECK_SIZEOF( mfaceinfo_t, 176, 304 );
|
||||||
|
|
||||||
#endif//COM_MODEL_H
|
#endif//COM_MODEL_H
|
||||||
|
|||||||
@@ -717,6 +717,7 @@ enum
|
|||||||
kRenderFxExplode, // Scale up really big!
|
kRenderFxExplode, // Scale up really big!
|
||||||
kRenderFxGlowShell, // Glowing Shell
|
kRenderFxGlowShell, // Glowing Shell
|
||||||
kRenderFxClampMinScale, // Keep this sprite from getting very small (SPRITES only!)
|
kRenderFxClampMinScale, // Keep this sprite from getting very small (SPRITES only!)
|
||||||
|
kRenderFxLightMultiplier,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef int func_t;
|
typedef int func_t;
|
||||||
|
|||||||
159
common/cvardef.h
159
common/cvardef.h
@@ -1,49 +1,122 @@
|
|||||||
/***
|
/*
|
||||||
*
|
cvardef.h - quake cvar definition
|
||||||
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
|
Copyright (C) 1997-2001 Id Software, Inc.
|
||||||
*
|
Copyright (C) 2024 Alibek Omarov
|
||||||
* This product contains software technology licensed from Id
|
|
||||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
|
||||||
* All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Use, distribution, and modification of this source code and/or resulting
|
|
||||||
* object code is restricted to non-commercial enhancements to products from
|
|
||||||
* Valve LLC. All other use, distribution, or modification is prohibited
|
|
||||||
* without written permission from Valve LLC.
|
|
||||||
*
|
|
||||||
****/
|
|
||||||
#ifndef CVARDEF_H
|
|
||||||
#define CVARDEF_H
|
|
||||||
|
|
||||||
#define FCVAR_ARCHIVE (1<<0) // set to cause it to be saved to vars.rc
|
This program is free software; you can redistribute it and/or
|
||||||
#define FCVAR_USERINFO (1<<1) // changes the client's info string
|
modify it under the terms of the GNU General Public License
|
||||||
#define FCVAR_SERVER (1<<2) // notifies players when changed
|
as published by the Free Software Foundation; either version 2
|
||||||
#define FCVAR_EXTDLL (1<<3) // defined by external DLL
|
of the License, or (at your option) any later version.
|
||||||
#define FCVAR_CLIENTDLL (1<<4) // defined by the client dll
|
|
||||||
#define FCVAR_PROTECTED (1<<5) // It's a server cvar, but we don't send the data since it's a password, etc. Sends 1 if it's not bland/zero, 0 otherwise as value
|
|
||||||
#define FCVAR_SPONLY (1<<6) // This cvar cannot be changed by clients connected to a multiplayer server.
|
|
||||||
#define FCVAR_PRINTABLEONLY (1<<7) // This cvar's string cannot contain unprintable characters ( e.g., used for player name etc ).
|
|
||||||
#define FCVAR_UNLOGGED (1<<8) // If this is a FCVAR_SERVER, don't log changes to the log file / console if we are creating a log
|
|
||||||
#define FCVAR_NOEXTRAWHITEPACE (1<<9) // strip trailing/leading white space from this cvar
|
|
||||||
#define FCVAR_PRIVILEGED (1<<10) // only available in privileged mode
|
|
||||||
#define FCVAR_FILTERABLE (1<<11) // filtered in unprivileged mode if cl_filterstuffcmd is 1
|
|
||||||
|
|
||||||
// Xash3D extensions
|
This program is distributed in the hope that it will be useful,
|
||||||
#define FCVAR_GLCONFIG (1<<12) // write it into <renderer>.cfg(see RefAPI)
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
#define FCVAR_CHANGED (1<<13) // set each time the cvar is changed
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
#define FCVAR_GAMEUIDLL (1<<14) // defined by the menu DLL
|
|
||||||
#define FCVAR_CHEAT (1<<15) // can not be changed if cheats are disabled
|
|
||||||
|
|
||||||
// a1ba: let's reuse higher bits for flags extensions from now on
|
See the GNU General Public License for more details.
|
||||||
#define FCVAR_LATCH (1<<30) // notify client what this cvar will be applied only after server restart (but don't does more nothing)
|
|
||||||
|
|
||||||
typedef struct cvar_s
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
#ifndef CVAR
|
||||||
|
#define CVAR
|
||||||
|
|
||||||
|
#include STDINT_H
|
||||||
|
#include "xash3d_types.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
cvar_t variables are used to hold scalar or string variables that can be changed
|
||||||
|
or displayed at the console or prog code as well as accessed directly
|
||||||
|
in C code.
|
||||||
|
|
||||||
|
The user can access cvars from the console in three ways:
|
||||||
|
r_draworder prints the current value
|
||||||
|
r_draworder 0 sets the current value to 0
|
||||||
|
set r_draworder 0 as above, but creates the cvar if not present
|
||||||
|
|
||||||
|
Cvars are restricted from having the same names as commands to keep this
|
||||||
|
interface from being ambiguous.
|
||||||
|
|
||||||
|
The are also occasionally used to communicated information between different
|
||||||
|
modules of the program.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
enum
|
||||||
{
|
{
|
||||||
char *name;
|
// GoldSrc compatibility flags
|
||||||
char *string;
|
FCVAR_ARCHIVE = 1 << 0, // set to cause it to be saved to vars.rc
|
||||||
int flags;
|
FCVAR_USERINFO = 1 << 1, // added to userinfo when changed
|
||||||
float value;
|
FCVAR_SERVER = 1 << 2, // added to serverinfo when changed, will notify clients by default
|
||||||
struct cvar_s *next;
|
FCVAR_EXTDLL = 1 << 3, // defined by server.dll
|
||||||
} cvar_t;
|
FCVAR_CLIENTDLL = 1 << 4, // defined by client.dll
|
||||||
|
FCVAR_PROTECTED = 1 << 5, // private server cvar
|
||||||
|
FCVAR_SPONLY = 1 << 6, // can be set only in singleplayer
|
||||||
|
FCVAR_PRINTABLEONLY = 1 << 7, // only allows printable characters
|
||||||
|
FCVAR_UNLOGGED = 1 << 8, // disables notifying client about server cvar change
|
||||||
|
FCVAR_NOEXTRAWHITESPACE = 1 << 9, // removes space characters from the beginning and the end of the string
|
||||||
|
FCVAR_PRIVILEGED = 1 << 10, // only available in privileged mode
|
||||||
|
FCVAR_FILTERABLE = 1 << 11, // treated as privileged if cl_filterstuffcmd is 1, otherwise ignored
|
||||||
|
|
||||||
#endif//CVARDEF_H
|
// Xash3D public flags
|
||||||
|
// FCVAR_LATCH = 1 << 11, // deprecated Xash3D flag, conflicts with FCVAR_FILTERABLE. Use another FCVAR_LATCH!
|
||||||
|
FCVAR_GLCONFIG = 1 << 12, // set to cause it to be saved to <renderer>.cfg (see RefAPI)
|
||||||
|
FCVAR_CHANGED = 1 << 13, // set each time the cvar changed
|
||||||
|
FCVAR_GAMEUIDLL = 1 << 14, // defined by menu.dll
|
||||||
|
FCVAR_CHEAT = 1 << 15, // cannot be changed if sv_cheats is 0
|
||||||
|
|
||||||
|
#if REF_DLL || ENGINE_DLL // Xash3D internal flags, MUST NOT be used outside of engine
|
||||||
|
FCVAR_RENDERINFO = 1 << 16, // set to cause it to be saved to video.cfg
|
||||||
|
FCVAR_READ_ONLY = 1 << 17, // display only, cannot be set by user at all
|
||||||
|
FCVAR_EXTENDED = 1 << 18, // extended cvar structure
|
||||||
|
FCVAR_ALLOCATED = 1 << 19, // allocated by the engine, must be freed with Mem_Free
|
||||||
|
FCVAR_VIDRESTART = 1 << 20, // triggers video subsystem to recreate/modify window parameters
|
||||||
|
FCVAR_TEMPORARY = 1 << 21, // only used to temporarly hold some value, can be unlinked
|
||||||
|
FCVAR_MOVEVARS = 1 << 22, // access to movevars_t structure, synchornized between client and server
|
||||||
|
FCVAR_USER_CREATED = 1 << 23, // created by a set command
|
||||||
|
|
||||||
|
FCVAR_REFDLL = 1 << 29, // (Xash3D FWGS internal flag) defined by the renderer DLL
|
||||||
|
#endif // REF_DLL || ENGINE_DLL
|
||||||
|
|
||||||
|
FCVAR_LATCH = 1 << 30, // (Xash3D FWGS public flag, was FCVAR_FILTERABLE in Xash3D) save changes until server restart
|
||||||
|
};
|
||||||
|
|
||||||
|
struct cvar_s {
|
||||||
|
char *name;
|
||||||
|
char *string;
|
||||||
|
uint32_t flags;
|
||||||
|
float value;
|
||||||
|
struct cvar_s *next;
|
||||||
|
};
|
||||||
|
typedef struct cvar_s cvar_t;
|
||||||
|
|
||||||
|
STATIC_CHECK_SIZEOF( struct cvar_s, 20, 32 );
|
||||||
|
|
||||||
|
#if REF_DLL || ENGINE_DLL // Xash3D internal cvar format, MUST NOT be used outside of engine
|
||||||
|
struct convar_s {
|
||||||
|
char *name;
|
||||||
|
char *string;
|
||||||
|
uint32_t flags;
|
||||||
|
float value;
|
||||||
|
struct convar_s *next;
|
||||||
|
char *desc;
|
||||||
|
char *def_string;
|
||||||
|
};
|
||||||
|
typedef struct convar_s convar_t;
|
||||||
|
|
||||||
|
#if XASH_64BIT
|
||||||
|
#define CVAR_SENTINEL (uintptr_t)0xDEADBEEFDEADBEEF
|
||||||
|
#else
|
||||||
|
#define CVAR_SENTINEL (uintptr_t)0xDEADBEEF
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define CVAR_CHECK_SENTINEL( cv ) ((uintptr_t)(cv)->next == CVAR_SENTINEL)
|
||||||
|
|
||||||
|
#define CVAR_DEFINE( cv, cvname, cvstr, cvflags, cvdesc ) \
|
||||||
|
convar_t cv = { (char*)cvname, (char*)cvstr, cvflags, 0.0f, (void *)CVAR_SENTINEL, (char*)cvdesc, NULL }
|
||||||
|
|
||||||
|
#define CVAR_DEFINE_AUTO( cv, cvstr, cvflags, cvdesc ) CVAR_DEFINE( cv, #cv, cvstr, cvflags, cvdesc )
|
||||||
|
#endif // REF_DLL || ENGINE_DLL
|
||||||
|
|
||||||
|
#endif // CVAR
|
||||||
|
|||||||
@@ -47,29 +47,11 @@ SETUP BACKENDS DEFINITIONS
|
|||||||
#endif // XASH_TIMER
|
#endif // XASH_TIMER
|
||||||
|
|
||||||
#ifndef XASH_MESSAGEBOX
|
#ifndef XASH_MESSAGEBOX
|
||||||
#define XASH_MESSAGEBOX MSGBOX_SDL
|
#if !XASH_NSWITCH // SDL2 messageboxes not available
|
||||||
|
#define XASH_MESSAGEBOX MSGBOX_SDL
|
||||||
|
#endif
|
||||||
#endif // XASH_MESSAGEBOX
|
#endif // XASH_MESSAGEBOX
|
||||||
#endif
|
#endif
|
||||||
#elif XASH_ANDROID
|
|
||||||
// we are building for Android platform, use Android APIs
|
|
||||||
#ifndef XASH_VIDEO
|
|
||||||
#define XASH_VIDEO VIDEO_ANDROID
|
|
||||||
#endif // XASH_VIDEO
|
|
||||||
|
|
||||||
#ifndef XASH_INPUT
|
|
||||||
#define XASH_INPUT INPUT_ANDROID
|
|
||||||
#endif // XASH_INPUT
|
|
||||||
|
|
||||||
#ifndef XASH_SOUND
|
|
||||||
#define XASH_SOUND SOUND_OPENSLES
|
|
||||||
#endif // XASH_SOUND
|
|
||||||
|
|
||||||
#ifndef XASH_MESSAGEBOX
|
|
||||||
#define XASH_MESSAGEBOX MSGBOX_ANDROID
|
|
||||||
#endif // XASH_MESSAGEBOX
|
|
||||||
|
|
||||||
#define XASH_USE_EVDEV
|
|
||||||
#define XASH_DYNAMIC_DLADDR
|
|
||||||
#elif XASH_LINUX
|
#elif XASH_LINUX
|
||||||
// we are building for Linux without SDL2, can draw only to framebuffer yet
|
// we are building for Linux without SDL2, can draw only to framebuffer yet
|
||||||
#ifndef XASH_VIDEO
|
#ifndef XASH_VIDEO
|
||||||
@@ -84,7 +66,7 @@ SETUP BACKENDS DEFINITIONS
|
|||||||
#define XASH_SOUND SOUND_ALSA
|
#define XASH_SOUND SOUND_ALSA
|
||||||
#endif // XASH_SOUND
|
#endif // XASH_SOUND
|
||||||
|
|
||||||
#define XASH_USE_EVDEV
|
#define XASH_USE_EVDEV 1
|
||||||
#elif XASH_DOS4GW
|
#elif XASH_DOS4GW
|
||||||
#ifndef XASH_VIDEO
|
#ifndef XASH_VIDEO
|
||||||
#define XASH_VIDEO VIDEO_DOS
|
#define XASH_VIDEO VIDEO_DOS
|
||||||
@@ -105,22 +87,13 @@ SETUP BACKENDS DEFINITIONS
|
|||||||
#ifndef XASH_MESSAGEBOX
|
#ifndef XASH_MESSAGEBOX
|
||||||
#if XASH_WIN32
|
#if XASH_WIN32
|
||||||
#define XASH_MESSAGEBOX MSGBOX_WIN32
|
#define XASH_MESSAGEBOX MSGBOX_WIN32
|
||||||
|
#elif XASH_NSWITCH
|
||||||
|
#define XASH_MESSAGEBOX MSGBOX_NSWITCH
|
||||||
#else // !XASH_WIN32
|
#else // !XASH_WIN32
|
||||||
#define XASH_MESSAGEBOX MSGBOX_STDERR
|
#define XASH_MESSAGEBOX MSGBOX_STDERR
|
||||||
#endif // !XASH_WIN32
|
#endif // !XASH_WIN32
|
||||||
#endif // XASH_MESSAGEBOX
|
#endif // XASH_MESSAGEBOX
|
||||||
|
|
||||||
//
|
|
||||||
// select crashhandler based on defines
|
|
||||||
//
|
|
||||||
#ifndef XASH_CRASHHANDLER
|
|
||||||
#if XASH_WIN32 && defined(DBGHELP)
|
|
||||||
#define XASH_CRASHHANDLER CRASHHANDLER_DBGHELP
|
|
||||||
#elif XASH_LINUX || XASH_BSD
|
|
||||||
#define XASH_CRASHHANDLER CRASHHANDLER_UCONTEXT
|
|
||||||
#endif // !(XASH_LINUX || XASH_BSD || XASH_WIN32)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// no timer - no xash
|
// no timer - no xash
|
||||||
//
|
//
|
||||||
@@ -157,10 +130,6 @@ SETUP BACKENDS DEFINITIONS
|
|||||||
#define XASH_INPUT INPUT_NULL
|
#define XASH_INPUT INPUT_NULL
|
||||||
#endif // XASH_INPUT
|
#endif // XASH_INPUT
|
||||||
|
|
||||||
#ifndef XASH_CRASHHANDLER
|
|
||||||
#define XASH_CRASHHANDLER CRASHHANDLER_NULL
|
|
||||||
#endif // XASH_CRASHHANDLER
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=========================================================================
|
=========================================================================
|
||||||
|
|
||||||
@@ -169,27 +138,59 @@ Default build-depended cvar and constant values
|
|||||||
=========================================================================
|
=========================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if XASH_MOBILE_PLATFORM
|
// Platform overrides
|
||||||
#define DEFAULT_TOUCH_ENABLE "1"
|
#if XASH_NSWITCH
|
||||||
#define DEFAULT_M_IGNORE "1"
|
|
||||||
#else // !XASH_MOBILE_PLATFORM
|
|
||||||
#define DEFAULT_TOUCH_ENABLE "0"
|
#define DEFAULT_TOUCH_ENABLE "0"
|
||||||
#define DEFAULT_M_IGNORE "0"
|
#define DEFAULT_M_IGNORE "1"
|
||||||
#endif // !XASH_MOBILE_PLATFORM
|
#define DEFAULT_MODE_WIDTH 1280
|
||||||
|
#define DEFAULT_MODE_HEIGHT 720
|
||||||
|
#define DEFAULT_ALLOWCONSOLE 1
|
||||||
|
#elif XASH_PSVITA
|
||||||
|
#define DEFAULT_TOUCH_ENABLE "0"
|
||||||
|
#define DEFAULT_M_IGNORE "1"
|
||||||
|
#define DEFAULT_MODE_WIDTH 960
|
||||||
|
#define DEFAULT_MODE_HEIGHT 544
|
||||||
|
#define DEFAULT_ALLOWCONSOLE 1
|
||||||
|
#elif XASH_ANDROID
|
||||||
|
#define DEFAULT_TOUCH_ENABLE "1"
|
||||||
|
#elif XASH_MOBILE_PLATFORM
|
||||||
|
#define DEFAULT_TOUCH_ENABLE "1"
|
||||||
|
#define DEFAULT_M_IGNORE "1"
|
||||||
|
#endif // !XASH_MOBILE_PLATFORM && !XASH_NSWITCH
|
||||||
|
|
||||||
#if XASH_ANDROID || XASH_IOS || XASH_EMSCRIPTEN
|
#if XASH_ANDROID || XASH_IOS || XASH_EMSCRIPTEN
|
||||||
#define XASH_INTERNAL_GAMELIBS
|
// this means that libraries are provided with engine, but not in game data
|
||||||
// this means that libraries are provided with engine, but not in game data
|
// You need add library loading code to library.c when adding new platform
|
||||||
// You need add library loading code to library.c when adding new platform
|
#define XASH_INTERNAL_GAMELIBS
|
||||||
#endif // XASH_ANDROID || XASH_IOS || XASH_EMSCRIPTEN
|
#endif // XASH_ANDROID || XASH_IOS || XASH_EMSCRIPTEN
|
||||||
|
|
||||||
// allow override for developer/debug builds
|
// Defaults
|
||||||
|
#ifndef DEFAULT_TOUCH_ENABLE
|
||||||
|
#define DEFAULT_TOUCH_ENABLE "0"
|
||||||
|
#endif // DEFAULT_TOUCH_ENABLE
|
||||||
|
|
||||||
|
#ifndef DEFAULT_M_IGNORE
|
||||||
|
#define DEFAULT_M_IGNORE "0"
|
||||||
|
#endif // DEFAULT_M_IGNORE
|
||||||
|
|
||||||
|
#ifndef DEFAULT_JOY_DEADZONE
|
||||||
|
#define DEFAULT_JOY_DEADZONE "4096"
|
||||||
|
#endif // DEFAULT_JOY_DEADZONE
|
||||||
|
|
||||||
#ifndef DEFAULT_DEV
|
#ifndef DEFAULT_DEV
|
||||||
#define DEFAULT_DEV 0
|
#define DEFAULT_DEV 0
|
||||||
#endif // DEFAULT_DEV
|
#endif // DEFAULT_DEV
|
||||||
|
|
||||||
|
#ifndef DEFAULT_ALLOWCONSOLE
|
||||||
|
#define DEFAULT_ALLOWCONSOLE 0
|
||||||
|
#endif // DEFAULT_ALLOWCONSOLE
|
||||||
|
|
||||||
#ifndef DEFAULT_FULLSCREEN
|
#ifndef DEFAULT_FULLSCREEN
|
||||||
#define DEFAULT_FULLSCREEN 1
|
#define DEFAULT_FULLSCREEN "1" // must be a string
|
||||||
#endif // DEFAULT_FULLSCREEN
|
#endif // DEFAULT_FULLSCREEN
|
||||||
|
|
||||||
|
#ifndef DEFAULT_MAX_EDICTS
|
||||||
|
#define DEFAULT_MAX_EDICTS 1200 // was 900 before HL25
|
||||||
|
#endif // DEFAULT_MAX_EDICTS
|
||||||
|
|
||||||
#endif // DEFAULTS_H
|
#endif // DEFAULTS_H
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
features.h - engine features that can be enabled by mod-maker request
|
enginefeatures.h - engine features that can be enabled by mod-maker request
|
||||||
Copyright (C) 2012 Uncle Mike
|
Copyright (C) 2012 Uncle Mike
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
@@ -27,4 +27,20 @@ GNU General Public License for more details.
|
|||||||
#define ENGINE_COMPUTE_STUDIO_LERP (1<<7) // enable MOVETYPE_STEP lerping back in engine
|
#define ENGINE_COMPUTE_STUDIO_LERP (1<<7) // enable MOVETYPE_STEP lerping back in engine
|
||||||
#define ENGINE_LINEAR_GAMMA_SPACE (1<<8) // disable influence of gamma/brightness cvars to textures/lightmaps, for mods with custom renderer
|
#define ENGINE_LINEAR_GAMMA_SPACE (1<<8) // disable influence of gamma/brightness cvars to textures/lightmaps, for mods with custom renderer
|
||||||
|
|
||||||
|
#define ENGINE_DISABLE_HDTEXTURES (1U<<30) // disable support of HD-textures in case custom renderer have separate way to load them
|
||||||
|
#define ENGINE_STEP_POSHISTORY_LERP (1U<<31) // enable MOVETYPE_STEP interpolation based on position history. Incompatible with ENGINE_COMPUTE_STUDIO_LERP!
|
||||||
|
|
||||||
|
// adjust the mask when features will be added or removed
|
||||||
|
#define ENGINE_FEATURES_MASK \
|
||||||
|
( ENGINE_WRITE_LARGE_COORD \
|
||||||
|
| ENGINE_QUAKE_COMPATIBLE \
|
||||||
|
| ENGINE_LOAD_DELUXEDATA \
|
||||||
|
| ENGINE_PHYSICS_PUSHER_EXT \
|
||||||
|
| ENGINE_LARGE_LIGHTMAPS \
|
||||||
|
| ENGINE_COMPENSATE_QUAKE_BUG \
|
||||||
|
| ENGINE_IMPROVED_LINETRACE \
|
||||||
|
| ENGINE_COMPUTE_STUDIO_LERP \
|
||||||
|
| ENGINE_LINEAR_GAMMA_SPACE \
|
||||||
|
| ENGINE_STEP_POSHISTORY_LERP )
|
||||||
|
|
||||||
#endif//FEATURES_H
|
#endif//FEATURES_H
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ GNU General Public License for more details.
|
|||||||
#define GFL_NOMODELS (1<<0)
|
#define GFL_NOMODELS (1<<0)
|
||||||
#define GFL_NOSKILLS (1<<1)
|
#define GFL_NOSKILLS (1<<1)
|
||||||
#define GFL_RENDER_PICBUTTON_TEXT (1<<2)
|
#define GFL_RENDER_PICBUTTON_TEXT (1<<2)
|
||||||
|
#define GFL_HD_BACKGROUND (1<<3)
|
||||||
|
#define GFL_ANIMATED_TITLE (1<<4)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
========================================================================
|
========================================================================
|
||||||
@@ -28,7 +30,7 @@ GAMEINFO stuff
|
|||||||
internal shared gameinfo structure (readonly for engine parts)
|
internal shared gameinfo structure (readonly for engine parts)
|
||||||
========================================================================
|
========================================================================
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct GAMEINFO_s
|
||||||
{
|
{
|
||||||
// filesystem info
|
// filesystem info
|
||||||
char gamefolder[64]; // used for change game '-game x'
|
char gamefolder[64]; // used for change game '-game x'
|
||||||
@@ -48,4 +50,48 @@ typedef struct
|
|||||||
int gamemode;
|
int gamemode;
|
||||||
} GAMEINFO;
|
} GAMEINFO;
|
||||||
|
|
||||||
|
/*
|
||||||
|
========================================================================
|
||||||
|
|
||||||
|
Extended GameInfo struct introduced in Xash3D FWGS
|
||||||
|
|
||||||
|
GAMEINFO can't be reliably extended, as nor engine, nor menu can't be
|
||||||
|
sure about struct size. By adding struct versioning, we can check the
|
||||||
|
presense for extra fields.
|
||||||
|
========================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define GAMEINFO_VERSION 2
|
||||||
|
|
||||||
|
typedef enum gametype_e
|
||||||
|
{
|
||||||
|
GAME_NORMAL,
|
||||||
|
GAME_SINGLEPLAYER_ONLY,
|
||||||
|
GAME_MULTIPLAYER_ONLY,
|
||||||
|
} gametype_t;
|
||||||
|
|
||||||
|
typedef struct gameinfo2_s
|
||||||
|
{
|
||||||
|
int gi_version; // should be set to desired struct version, e.g. GAMEINFO_VERSION
|
||||||
|
|
||||||
|
// filesystem info
|
||||||
|
char gamefolder[64]; // used for change game
|
||||||
|
char startmap[64]; // map to start singleplayer game from
|
||||||
|
char trainmap[64]; // map to start hazardous course from (if specified)
|
||||||
|
char demomap[64]; // map to start demo chapter from (if specified)
|
||||||
|
char title[64]; // game title
|
||||||
|
char iconpath[64]; // path to game icon
|
||||||
|
char version[16]; // game version (optional)
|
||||||
|
uint32_t flags; // gameinfo flags, extended to fit more flags
|
||||||
|
|
||||||
|
// mod info
|
||||||
|
char game_url[256]; // link to a developer's site
|
||||||
|
char update_url[256]; // link to updates page
|
||||||
|
char type[64]; // single, toolkit, multiplayer, etc
|
||||||
|
char date[64]; // release date
|
||||||
|
uint64_t size; // size in bytes
|
||||||
|
|
||||||
|
gametype_t gamemode;
|
||||||
|
} gameinfo2_t;
|
||||||
|
|
||||||
#endif//GAMEINFO_H
|
#endif//GAMEINFO_H
|
||||||
|
|||||||
@@ -1,18 +1,35 @@
|
|||||||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
/*
|
||||||
//
|
Copyright (C) 1996-1997 Id Software, Inc.
|
||||||
// Purpose:
|
|
||||||
//
|
|
||||||
// $NoKeywords: $
|
|
||||||
//=============================================================================
|
|
||||||
|
|
||||||
#if !defined( KBUTTONH )
|
This program is free software; you can redistribute it and/or
|
||||||
#define KBUTTONH
|
modify it under the terms of the GNU General Public License
|
||||||
#pragma once
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
typedef struct kbutton_s
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
*/
|
||||||
|
#ifndef KBUTTON_H
|
||||||
|
#define KBUTTON_H
|
||||||
|
|
||||||
|
// a1ba: copied from WinQuake/client.h
|
||||||
|
//
|
||||||
|
// cl_input
|
||||||
|
//
|
||||||
|
typedef struct
|
||||||
{
|
{
|
||||||
int down[2]; // key nums holding it down
|
int down[2]; // key nums holding it down
|
||||||
int state; // low bit is down state
|
int state; // low bit is down state
|
||||||
} kbutton_t;
|
} kbutton_t;
|
||||||
|
|
||||||
#endif // !KBUTTONH
|
STATIC_CHECK_SIZEOF( kbutton_t, 12, 12 );
|
||||||
|
|
||||||
|
#endif // KBUTTON_H
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
// Set this flag for things like broadcast requests, etc. where the engine should not
|
// Set this flag for things like broadcast requests, etc. where the engine should not
|
||||||
// kill the request hook after receiving the first response
|
// kill the request hook after receiving the first response
|
||||||
#define FNETAPI_MULTIPLE_RESPONSE ( 1<<0 )
|
#define FNETAPI_MULTIPLE_RESPONSE ( 1<<0 )
|
||||||
|
#define FNETAPI_LEGACY_PROTOCOL ( 1<<1 ) // xash3d-fwgs extension
|
||||||
|
|
||||||
struct net_response_s;
|
struct net_response_s;
|
||||||
typedef void (*net_api_response_func_t) ( struct net_response_s *response );
|
typedef void (*net_api_response_func_t) ( struct net_response_s *response );
|
||||||
@@ -35,6 +36,7 @@ typedef void (*net_api_response_func_t) ( struct net_response_s *response );
|
|||||||
#define NET_ERROR_TIMEOUT ( 1<<0 )
|
#define NET_ERROR_TIMEOUT ( 1<<0 )
|
||||||
#define NET_ERROR_PROTO_UNSUPPORTED ( 1<<1 )
|
#define NET_ERROR_PROTO_UNSUPPORTED ( 1<<1 )
|
||||||
#define NET_ERROR_UNDEFINED ( 1<<2 )
|
#define NET_ERROR_UNDEFINED ( 1<<2 )
|
||||||
|
#define NET_ERROR_FORBIDDEN ( 1<<3 ) // xash3d-fwgs extension
|
||||||
|
|
||||||
typedef struct net_adrlist_s
|
typedef struct net_adrlist_s
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,37 +1,74 @@
|
|||||||
/***
|
/*
|
||||||
*
|
Copyright (C) 1997-2001 Id Software, Inc.
|
||||||
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
|
|
||||||
*
|
|
||||||
* This product contains software technology licensed from Id
|
|
||||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
|
||||||
* All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Use, distribution, and modification of this source code and/or resulting
|
|
||||||
* object code is restricted to non-commercial enhancements to products from
|
|
||||||
* Valve LLC. All other use, distribution, or modification is prohibited
|
|
||||||
* without written permission from Valve LLC.
|
|
||||||
*
|
|
||||||
****/
|
|
||||||
|
|
||||||
#ifndef NETADR_H
|
This program is free software; you can redistribute it and/or
|
||||||
#define NETADR_H
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
typedef enum
|
This program is distributed in the hope that it will be useful,
|
||||||
{
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
NA_UNUSED,
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
NA_LOOPBACK,
|
|
||||||
NA_BROADCAST,
|
|
||||||
NA_IP,
|
|
||||||
NA_IPX,
|
|
||||||
NA_BROADCAST_IPX
|
|
||||||
} netadrtype_t;
|
|
||||||
|
|
||||||
typedef struct netadr_s
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef NET_ADR_H
|
||||||
|
#define NET_ADR_H
|
||||||
|
|
||||||
|
#include STDINT_H
|
||||||
|
|
||||||
|
// net.h -- quake's interface to the networking layer
|
||||||
|
// a1ba: copied from Quake-2/qcommon/qcommon.h and modified to support IPv6
|
||||||
|
|
||||||
|
#define PORT_ANY -1
|
||||||
|
|
||||||
|
typedef enum {NA_LOOPBACK = 1, NA_BROADCAST, NA_IP, NA_IPX, NA_BROADCAST_IPX, NA_IP6, NA_MULTICAST_IP6} netadrtype_t;
|
||||||
|
|
||||||
|
/*
|
||||||
|
Original Quake-2 structure:
|
||||||
|
typedef struct
|
||||||
{
|
{
|
||||||
netadrtype_t type;
|
netadrtype_t type;
|
||||||
unsigned char ip[4];
|
|
||||||
unsigned char ipx[10];
|
byte ip[4];
|
||||||
|
byte ipx[10];
|
||||||
|
|
||||||
unsigned short port;
|
unsigned short port;
|
||||||
} netadr_t;
|
} netadr_t;
|
||||||
|
*/
|
||||||
|
|
||||||
#endif//NETADR_H
|
#pragma pack( push, 1 )
|
||||||
|
typedef struct netadr_s
|
||||||
|
{
|
||||||
|
union
|
||||||
|
{
|
||||||
|
// IPv6 struct
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
uint16_t type6;
|
||||||
|
uint8_t ip6[16];
|
||||||
|
};
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
uint32_t type; // must be netadrtype_t but will break with short enums
|
||||||
|
union
|
||||||
|
{
|
||||||
|
uint8_t ip[4];
|
||||||
|
uint32_t ip4; // for easier conversions
|
||||||
|
};
|
||||||
|
uint8_t ipx[10];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
uint16_t port;
|
||||||
|
} netadr_t;
|
||||||
|
#pragma pack( pop )
|
||||||
|
|
||||||
|
STATIC_CHECK_SIZEOF( netadr_t, 20, 20 );
|
||||||
|
|
||||||
|
#endif // NET_ADR_H
|
||||||
|
|||||||
@@ -35,20 +35,23 @@ GNU General Public License for more details.
|
|||||||
#define __cdecl
|
#define __cdecl
|
||||||
#define __stdcall
|
#define __stdcall
|
||||||
#define _inline static inline
|
#define _inline static inline
|
||||||
#define FORCEINLINE inline __attribute__((always_inline))
|
|
||||||
|
|
||||||
#if XASH_POSIX
|
#if XASH_POSIX
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <dlfcn.h>
|
#if XASH_NSWITCH
|
||||||
|
#define SOLDER_LIBDL_COMPAT
|
||||||
#define PATH_SPLITTER "/"
|
#include <solder.h>
|
||||||
#define HAVE_DUP
|
#elif XASH_PSVITA
|
||||||
|
#define VRTLD_LIBDL_COMPAT
|
||||||
#define O_BINARY 0
|
#include <vrtld.h>
|
||||||
#define O_TEXT 0
|
#define O_BINARY 0
|
||||||
|
#else
|
||||||
|
#include <dlfcn.h>
|
||||||
|
#define HAVE_DUP
|
||||||
|
#define O_BINARY 0
|
||||||
|
#endif
|
||||||
|
#define O_TEXT 0
|
||||||
#define _mkdir( x ) mkdir( x, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH )
|
#define _mkdir( x ) mkdir( x, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH )
|
||||||
#elif XASH_DOS4GW
|
|
||||||
#define PATH_SPLITTER "\\"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef void* HANDLE;
|
typedef void* HANDLE;
|
||||||
@@ -59,14 +62,6 @@ GNU General Public License for more details.
|
|||||||
int x, y;
|
int x, y;
|
||||||
} POINT;
|
} POINT;
|
||||||
#else // WIN32
|
#else // WIN32
|
||||||
#define PATH_SPLITTER "\\"
|
|
||||||
#ifdef __MINGW32__
|
|
||||||
#define _inline static inline
|
|
||||||
#define FORCEINLINE inline __attribute__((always_inline))
|
|
||||||
#else
|
|
||||||
#define FORCEINLINE __forceinline
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define open _open
|
#define open _open
|
||||||
#define read _read
|
#define read _read
|
||||||
#define alloca _alloca
|
#define alloca _alloca
|
||||||
|
|||||||
@@ -56,6 +56,8 @@ color24 gTracerColors[] =
|
|||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define TRACER_COLORINDEX_DEFAULT 4
|
||||||
|
|
||||||
// Temporary entity array
|
// Temporary entity array
|
||||||
#define TENTPRIORITY_LOW 0
|
#define TENTPRIORITY_LOW 0
|
||||||
#define TENTPRIORITY_HIGH 1
|
#define TENTPRIORITY_HIGH 1
|
||||||
|
|||||||
@@ -107,7 +107,8 @@ typedef enum
|
|||||||
TF_ARB_FLOAT = (1<<26), // float textures
|
TF_ARB_FLOAT = (1<<26), // float textures
|
||||||
TF_NOCOMPARE = (1<<27), // disable comparing for depth textures
|
TF_NOCOMPARE = (1<<27), // disable comparing for depth textures
|
||||||
TF_ARB_16BIT = (1<<28), // keep image as 16-bit (not 24)
|
TF_ARB_16BIT = (1<<28), // keep image as 16-bit (not 24)
|
||||||
TF_MULTISAMPLE = (1<<29) // multisampling texture
|
TF_MULTISAMPLE = (1<<29), // multisampling texture
|
||||||
|
TF_ALLOW_NEAREST = (1<<30), // allows toggling nearest filtering for TF_NOMIPMAP textures
|
||||||
} texFlags_t;
|
} texFlags_t;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
@@ -161,7 +162,7 @@ struct ref_viewpass_s;
|
|||||||
typedef struct render_api_s
|
typedef struct render_api_s
|
||||||
{
|
{
|
||||||
// Get renderer info (doesn't changes engine state at all)
|
// Get renderer info (doesn't changes engine state at all)
|
||||||
int (*RenderGetParm)( int parm, int arg ); // generic
|
intptr_t (*RenderGetParm)( int parm, int arg ); // generic
|
||||||
void (*GetDetailScaleForTexture)( int texture, float *xScale, float *yScale );
|
void (*GetDetailScaleForTexture)( int texture, float *xScale, float *yScale );
|
||||||
void (*GetExtraParmsForTexture)( int texture, byte *red, byte *green, byte *blue, byte *alpha );
|
void (*GetExtraParmsForTexture)( int texture, byte *red, byte *green, byte *blue, byte *alpha );
|
||||||
lightstyle_t* (*GetLightStyle)( int number );
|
lightstyle_t* (*GetLightStyle)( int number );
|
||||||
@@ -229,7 +230,7 @@ typedef struct render_api_s
|
|||||||
void (*R_Reserved0)( void );
|
void (*R_Reserved0)( void );
|
||||||
|
|
||||||
// static allocations
|
// static allocations
|
||||||
void *(*pfnMemAlloc)( size_t cb, const char *filename, const int fileline );
|
void *(*pfnMemAlloc)( size_t cb, const char *filename, const int fileline ) ALLOC_CHECK( 1 );
|
||||||
void (*pfnMemFree)( void *mem, const char *filename, const int fileline );
|
void (*pfnMemFree)( void *mem, const char *filename, const int fileline );
|
||||||
|
|
||||||
// engine utils (not related with render API but placed here)
|
// engine utils (not related with render API but placed here)
|
||||||
|
|||||||
24
common/synctype.h
Normal file
24
common/synctype.h
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
synctype.h -- shared synctype_t definition
|
||||||
|
Copyright (C) 1996-1997 Id Software, Inc.
|
||||||
|
Copyright (C) 2023 Alibek Omarov
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
#ifndef SYNCTYPE_H
|
||||||
|
#define SYNCTYPE_H
|
||||||
|
typedef enum {ST_SYNC=0, ST_RAND } synctype_t;
|
||||||
|
#endif
|
||||||
@@ -4,12 +4,17 @@
|
|||||||
|
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
|
|
||||||
|
#if XASH_IRIX
|
||||||
|
#include <port.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if XASH_WIN32
|
#if XASH_WIN32
|
||||||
#include <wchar.h> // off_t
|
#include <wchar.h> // off_t
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
|
||||||
#include <sys/types.h> // off_t
|
#include <sys/types.h> // off_t
|
||||||
#include STDINT_H
|
#include STDINT_H
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
typedef unsigned char byte;
|
typedef unsigned char byte;
|
||||||
typedef int sound_t;
|
typedef int sound_t;
|
||||||
@@ -22,6 +27,7 @@ typedef byte rgba_t[4]; // unsigned byte colorpack
|
|||||||
typedef byte rgb_t[3]; // unsigned byte colorpack
|
typedef byte rgb_t[3]; // unsigned byte colorpack
|
||||||
typedef vec_t matrix3x4[3][4];
|
typedef vec_t matrix3x4[3][4];
|
||||||
typedef vec_t matrix4x4[4][4];
|
typedef vec_t matrix4x4[4][4];
|
||||||
|
|
||||||
typedef uint32_t poolhandle_t;
|
typedef uint32_t poolhandle_t;
|
||||||
|
|
||||||
#undef true
|
#undef true
|
||||||
@@ -40,15 +46,14 @@ typedef uint64_t longtime_t;
|
|||||||
#define MAX_SERVERINFO_STRING 512 // server handles too many settings. expand to 1024?
|
#define MAX_SERVERINFO_STRING 512 // server handles too many settings. expand to 1024?
|
||||||
#define MAX_LOCALINFO_STRING 32768 // localinfo used on server and not sended to the clients
|
#define MAX_LOCALINFO_STRING 32768 // localinfo used on server and not sended to the clients
|
||||||
#define MAX_SYSPATH 1024 // system filepath
|
#define MAX_SYSPATH 1024 // system filepath
|
||||||
|
#define MAX_VA_STRING 1024 // string length returned by va()
|
||||||
#define MAX_PRINT_MSG 8192 // how many symbols can handle single call of Con_Printf or Con_DPrintf
|
#define MAX_PRINT_MSG 8192 // how many symbols can handle single call of Con_Printf or Con_DPrintf
|
||||||
#define MAX_TOKEN 2048 // parse token length
|
#define MAX_TOKEN 2048 // parse token length
|
||||||
#define MAX_MODS 512 // environment games that engine can keep visible
|
#define MAX_MODS 512 // environment games that engine can keep visible
|
||||||
#define MAX_USERMSG_LENGTH 2048 // don't modify it's relies on a client-side definitions
|
#define MAX_USERMSG_LENGTH 2048 // don't modify it's relies on a client-side definitions
|
||||||
|
|
||||||
#define BIT( n ) ( 1U << ( n ))
|
#define BIT( n ) ( 1U << ( n ))
|
||||||
#define GAMMA ( 2.2f ) // Valve Software gamma
|
#define BIT64( n ) ( 1ULL << ( n ))
|
||||||
#define INVGAMMA ( 1.0f / 2.2f ) // back to 1.0
|
|
||||||
#define TEXGAMMA ( 0.9f ) // compensate dim textures
|
|
||||||
#define SetBits( iBitVector, bits ) ((iBitVector) = (iBitVector) | (bits))
|
#define SetBits( iBitVector, bits ) ((iBitVector) = (iBitVector) | (bits))
|
||||||
#define ClearBits( iBitVector, bits ) ((iBitVector) = (iBitVector) & ~(bits))
|
#define ClearBits( iBitVector, bits ) ((iBitVector) = (iBitVector) & ~(bits))
|
||||||
#define FBitSet( iBitVector, bit ) ((iBitVector) & (bit))
|
#define FBitSet( iBitVector, bit ) ((iBitVector) & (bit))
|
||||||
@@ -65,44 +70,96 @@ typedef uint64_t longtime_t;
|
|||||||
#define IsColorString( p ) ( p && *( p ) == '^' && *(( p ) + 1) && *(( p ) + 1) >= '0' && *(( p ) + 1 ) <= '9' )
|
#define IsColorString( p ) ( p && *( p ) == '^' && *(( p ) + 1) && *(( p ) + 1) >= '0' && *(( p ) + 1 ) <= '9' )
|
||||||
#define ColorIndex( c ) ((( c ) - '0' ) & 7 )
|
#define ColorIndex( c ) ((( c ) - '0' ) & 7 )
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
#if defined( __GNUC__ )
|
||||||
#ifdef __i386__
|
#if defined( __i386__ )
|
||||||
#define EXPORT __attribute__ ((visibility ("default"),force_align_arg_pointer))
|
#define EXPORT __attribute__(( visibility( "default" ), force_align_arg_pointer ))
|
||||||
#define GAME_EXPORT __attribute((force_align_arg_pointer))
|
#define GAME_EXPORT __attribute(( force_align_arg_pointer ))
|
||||||
#else
|
#else
|
||||||
#define EXPORT __attribute__ ((visibility ("default")))
|
#define EXPORT __attribute__(( visibility ( "default" )))
|
||||||
#define GAME_EXPORT
|
#define GAME_EXPORT
|
||||||
#endif
|
#endif
|
||||||
#define _format(x) __attribute__((format(printf, x, x+1)))
|
|
||||||
#define NORETURN __attribute__((noreturn))
|
|
||||||
#elif defined(_MSC_VER)
|
|
||||||
#define EXPORT __declspec( dllexport )
|
|
||||||
#define GAME_EXPORT
|
|
||||||
#define _format(x)
|
|
||||||
#define NORETURN
|
|
||||||
#else
|
|
||||||
#define EXPORT
|
|
||||||
#define GAME_EXPORT
|
|
||||||
#define _format(x)
|
|
||||||
#define NORETURN
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ( __GNUC__ >= 3 )
|
#define MALLOC __attribute__(( malloc ))
|
||||||
#define unlikely(x) __builtin_expect(x, 0)
|
|
||||||
#define likely(x) __builtin_expect(x, 1)
|
// added in GCC 11
|
||||||
#elif defined( __has_builtin )
|
#if __GNUC__ >= 11
|
||||||
#if __has_builtin( __builtin_expect )
|
// might want to set noclone due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116893
|
||||||
#define unlikely(x) __builtin_expect(x, 0)
|
// but it's easier to not force mismatched-dealloc to error yet
|
||||||
#define likely(x) __builtin_expect(x, 1)
|
#define MALLOC_LIKE( x, y ) __attribute__(( malloc( x, y )))
|
||||||
#else
|
#else
|
||||||
#define unlikely(x) (x)
|
#define MALLOC_LIKE( x, y ) MALLOC
|
||||||
#define likely(x) (x)
|
|
||||||
#endif
|
#endif
|
||||||
|
#define NORETURN __attribute__(( noreturn ))
|
||||||
|
#define NONNULL __attribute__(( nonnull ))
|
||||||
|
#define _format( x ) __attribute__(( format( printf, x, x + 1 )))
|
||||||
|
#define ALLOC_CHECK( x ) __attribute__(( alloc_size( x )))
|
||||||
|
#define NO_ASAN __attribute__(( no_sanitize( "address" )))
|
||||||
|
#define WARN_UNUSED_RESULT __attribute__(( warn_unused_result ))
|
||||||
|
#define RENAME_SYMBOL( x ) asm( x )
|
||||||
#else
|
#else
|
||||||
#define unlikely(x) (x)
|
#if defined( _MSC_VER )
|
||||||
#define likely(x) (x)
|
#define EXPORT __declspec( dllexport )
|
||||||
|
#define NO_ASAN __declspec( no_sanitize_address )
|
||||||
|
#else
|
||||||
|
#define EXPORT
|
||||||
|
#define NO_ASAN
|
||||||
|
#endif
|
||||||
|
#define GAME_EXPORT
|
||||||
|
#define NORETURN
|
||||||
|
#define NONNULL
|
||||||
|
#define _format( x )
|
||||||
|
#define ALLOC_CHECK( x )
|
||||||
|
#define RENAME_SYMBOL( x )
|
||||||
|
#define MALLOC
|
||||||
|
#define MALLOC_LIKE( x, y )
|
||||||
|
#define WARN_UNUSED_RESULT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if __GNUC__ >= 3
|
||||||
|
#define unlikely( x ) __builtin_expect( x, 0 )
|
||||||
|
#define likely( x ) __builtin_expect( x, 1 )
|
||||||
|
#elif defined( __has_builtin )
|
||||||
|
#if __has_builtin( __builtin_expect ) // this must be after defined() check
|
||||||
|
#define unlikely( x ) __builtin_expect( x, 0 )
|
||||||
|
#define likely( x ) __builtin_expect( x, 1 )
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined( unlikely ) || !defined( likely )
|
||||||
|
#define unlikely( x ) ( x )
|
||||||
|
#define likely( x ) ( x )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __STDC_VERSION__ >= 202311L || __cplusplus >= 201103L // C23 or C++ static_assert is a keyword
|
||||||
|
#define STATIC_ASSERT_( ignore, x, y ) static_assert( x, y )
|
||||||
|
#define STATIC_ASSERT static_assert
|
||||||
|
#elif __STDC_VERSION__ >= 201112L // in C11 it's _Static_assert
|
||||||
|
#define STATIC_ASSERT_( ignore, x, y ) _Static_assert( x, y )
|
||||||
|
#define STATIC_ASSERT _Static_assert
|
||||||
|
#else
|
||||||
|
#define STATIC_ASSERT_( id, x, y ) extern int id[( x ) ? 1 : -1]
|
||||||
|
// need these to correctly expand the line macro
|
||||||
|
#define STATIC_ASSERT_3( line, x, y ) STATIC_ASSERT_( static_assert_ ## line, x, y )
|
||||||
|
#define STATIC_ASSERT_2( line, x, y ) STATIC_ASSERT_3( line, x, y )
|
||||||
|
#define STATIC_ASSERT( x, y ) STATIC_ASSERT_2( __LINE__, x, y )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// at least, statically check size of some public structures
|
||||||
|
#if XASH_64BIT
|
||||||
|
#define STATIC_CHECK_SIZEOF( type, size32, size64 ) \
|
||||||
|
STATIC_ASSERT( sizeof( type ) == size64, #type " unexpected size" )
|
||||||
|
#else
|
||||||
|
#define STATIC_CHECK_SIZEOF( type, size32, size64 ) \
|
||||||
|
STATIC_ASSERT( sizeof( type ) == size32, #type " unexpected size" )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined( __cplusplus ) && __STDC_VERSION__ >= 199101L // not C++ and C99 or newer
|
||||||
|
#define XASH_RESTRICT restrict
|
||||||
|
#elif _MSC_VER || __GNUC__ || __clang__ // compiler-specific extensions
|
||||||
|
#define XASH_RESTRICT __restrict
|
||||||
|
#else
|
||||||
|
#define XASH_RESTRICT // nothing
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef XASH_BIG_ENDIAN
|
#ifdef XASH_BIG_ENDIAN
|
||||||
#define LittleLong(x) (((int)(((x)&255)<<24)) + ((int)((((x)>>8)&255)<<16)) + ((int)(((x)>>16)&255)<<8) + (((x) >> 24)&255))
|
#define LittleLong(x) (((int)(((x)&255)<<24)) + ((int)((((x)>>8)&255)<<16)) + ((int)(((x)>>16)&255)<<8) + (((x) >> 24)&255))
|
||||||
@@ -134,8 +191,9 @@ _inline float LittleFloat( float f )
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
typedef unsigned int dword;
|
typedef unsigned int dword;
|
||||||
typedef unsigned int uint;
|
typedef unsigned int uint;
|
||||||
|
typedef unsigned long ulong;
|
||||||
typedef char string[MAX_STRING];
|
typedef char string[MAX_STRING];
|
||||||
typedef struct file_s file_t; // normal file
|
typedef struct file_s file_t; // normal file
|
||||||
typedef struct stream_s stream_t; // sound stream for background music playing
|
typedef struct stream_s stream_t; // sound stream for background music playing
|
||||||
@@ -161,6 +219,7 @@ typedef struct dll_info_s
|
|||||||
} dll_info_t;
|
} dll_info_t;
|
||||||
|
|
||||||
typedef void (*setpair_t)( const char *key, const void *value, const void *buffer, void *numpairs );
|
typedef void (*setpair_t)( const char *key, const void *value, const void *buffer, void *numpairs );
|
||||||
|
typedef void *(*pfnCreateInterface_t)( const char *, int * );
|
||||||
|
|
||||||
// config strings are a general means of communication from
|
// config strings are a general means of communication from
|
||||||
// the server to all connected clients.
|
// the server to all connected clients.
|
||||||
|
|||||||
@@ -1,206 +0,0 @@
|
|||||||
#############################################
|
|
||||||
# Makefile.linux - linux makefile
|
|
||||||
# Copyright (C) 2017 mittorn
|
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
##############################################
|
|
||||||
|
|
||||||
# Default options - optimized to debug on local machine
|
|
||||||
CC ?= gcc
|
|
||||||
CXX ?= g++
|
|
||||||
CFLAGS ?= -g -O1 -fsigned-char -Wall -Wextra -Wsign-compare -Wno-unknown-pragmas -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-but-set-variable
|
|
||||||
LDFLAGS =
|
|
||||||
LBITS := $(shell getconf LONG_BIT)
|
|
||||||
DEPS :=
|
|
||||||
|
|
||||||
XASH_COMMIT := $(firstword $(shell git rev-parse --short=6 HEAD) unknown)
|
|
||||||
|
|
||||||
ifeq ($(XASH_COMMIT),unknown)
|
|
||||||
$(warning You seems to build xash3d without git)
|
|
||||||
$(warning Please use git if you are going to publish your build)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Pass 64BIT=1 to make arguments to allow amd64 builds
|
|
||||||
ifneq ($(64BIT),1)
|
|
||||||
ifeq ($(LBITS),64)
|
|
||||||
LDFLAGS += -m32
|
|
||||||
CFLAGS += -m32
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
TOPDIR = $(PWD)/..
|
|
||||||
INCLUDES :=
|
|
||||||
XASH_SINGLE_BINARY ?= 1
|
|
||||||
INSTALL_DIR ?= ./install/
|
|
||||||
ifeq ($(NANOGL),1)
|
|
||||||
INCLUDES += -Inanogl -Inanogl/GL
|
|
||||||
endif
|
|
||||||
INCLUDES += -I/usr/include/SDL2 -Icommon -I../common -I. -I../pm_shared -Iclient -Iserver -Iclient/vgui -Icommon/sdl
|
|
||||||
|
|
||||||
#############################
|
|
||||||
# Preprocessor defines:
|
|
||||||
#############################
|
|
||||||
DEFINES =
|
|
||||||
|
|
||||||
# Specify commit hash in version string
|
|
||||||
DEFINES += -DXASH_BUILD_COMMIT=\"$(XASH_COMMIT)\"
|
|
||||||
|
|
||||||
|
|
||||||
# Only SDL backend exists on linux
|
|
||||||
ifeq ($(XASH_DEDICATED),1)
|
|
||||||
DEFINES += -DXASH_DEDICATED
|
|
||||||
else
|
|
||||||
DEFINES += -DXASH_SDL
|
|
||||||
LIBS += -lSDL2
|
|
||||||
endif
|
|
||||||
|
|
||||||
#############################################
|
|
||||||
# GL/GLES translators.
|
|
||||||
# You need clone it to engine folder to use
|
|
||||||
# Only one translator should be enabled
|
|
||||||
#############################################
|
|
||||||
ifeq ($(NANOGL),1)
|
|
||||||
DEFINES += -DXASH_NANOGL -D__MULTITEXTURE_SUPPORT__ -DEGL_LIB=\"libEGL.so\"
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(WES),1)
|
|
||||||
DEFINES += -DXASH_WES -D__MULTITEXTURE_SUPPORT__ -DEGL_LIB=\"libEGL.so\"
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(REGAL),1)
|
|
||||||
DEFINES += -DXASH_REGAL -D__MULTITEXTURE_SUPPORT__ -DEGL_LIB=\"regal/lib/linux-32/libRegal.so\"
|
|
||||||
LIBS += regal/lib/linux-32/libRegal.so
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Some libc implementations cannot use libdl in static builds, so disable it by default
|
|
||||||
ifeq ($(XASH_STATIC),1)
|
|
||||||
|
|
||||||
ifneq ($(XASH_STATIC_LIBDL),1)
|
|
||||||
DEFINES += -DNO_LIBDL
|
|
||||||
endif
|
|
||||||
|
|
||||||
XASH_SINGLE_BINARY := 1
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(XASH_STATIC),1)
|
|
||||||
LIBS += -ldl
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(XASH_STATIC_LIBDL),1)
|
|
||||||
LIBS += -ldl
|
|
||||||
endif
|
|
||||||
|
|
||||||
LIBS += -lm -pthread
|
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(XASH_SINGLE_BINARY),1)
|
|
||||||
DEFINES += -DSINGLE_BINARY
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Collect files
|
|
||||||
SRCS_CPP =
|
|
||||||
SRCS = $(wildcard server/*.c) $(wildcard client/vgui/*.c) $(wildcard client/avi/*.c) $(wildcard common/*.c) $(wildcard common/imagelib/*.c) $(wildcard common/soundlib/*.c) $(wildcard common/soundlib/libmpg/*.c)
|
|
||||||
ifneq ($(XASH_DEDICATED),1)
|
|
||||||
SRCS += $(wildcard client/*.c)
|
|
||||||
SRCS += $(wildcard platform/sdl/*.c)
|
|
||||||
ifeq ($(WES),1)
|
|
||||||
SRCS += $(wildcard gl-wes-v2/src/*.c)
|
|
||||||
endif
|
|
||||||
ifeq ($(NANOGL),1)
|
|
||||||
SRCS_CPP += $(wildcard nanogl/*.cpp)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
OBJS = $(patsubst %.c,obj/%.o,$(SRCS))
|
|
||||||
OBJS_CPP = $(patsubst %.cpp,obj/%.o,$(SRCS_CPP))
|
|
||||||
|
|
||||||
#################################
|
|
||||||
# Windows DLL loader
|
|
||||||
# Should be enabled only on i386 builds
|
|
||||||
#################################
|
|
||||||
LOADER :=
|
|
||||||
ifeq ($(XASH_DLL_LOADER),1)
|
|
||||||
DEFINES += -DDLL_LOADER
|
|
||||||
ifeq ($(XASH_SINGLE_BINARY),1)
|
|
||||||
LOADER = libloader.a
|
|
||||||
else
|
|
||||||
LOADER = libloader.so
|
|
||||||
endif
|
|
||||||
DEPS += $(LOADER)
|
|
||||||
LIBS += $(LOADER)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Rules for binaries
|
|
||||||
ifeq ($(XASH_SINGLE_BINARY),0)
|
|
||||||
BINARIES = libxash.so
|
|
||||||
libxash.so : $(OBJS) $(OBJS_CPP) $(DEPS)
|
|
||||||
$(CC) -fvisibility=hidden -o libxash.so $(LDFLAGS) -shared $(OBJS) $(OBJS_CPP) $(LIBS)
|
|
||||||
|
|
||||||
else
|
|
||||||
BINARIES = xash
|
|
||||||
xash: $(OBJS) $(OBJS_CPP) $(DEPS)
|
|
||||||
ifeq ($(XASH_STATIC),1)
|
|
||||||
$(CC) -o xash -static $(LDFLAGS) $(OBJS) $(OBJS_CPP) $(LIBS)
|
|
||||||
else
|
|
||||||
$(CC) -o xash -fvisibility=hidden $(LDFLAGS) $(OBJS) $(OBJS_CPP) $(LIBS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(XASH_DLL_LOADER),1)
|
|
||||||
$(LOADER):
|
|
||||||
$(MAKE) -f ../loader/Makefile.linux -C ../loader $(LOADER)
|
|
||||||
cp ../loader/$(LOADER) .
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Create dirs for object files
|
|
||||||
DIRS := obj obj/server obj/client/avi obj/client/vgui obj/common/sdl obj/common/imagelib obj/common/soundlib/libmpg obj/platform/sdl obj/nanogl
|
|
||||||
$(OBJS): | $(DIRS)
|
|
||||||
|
|
||||||
$(DIRS) :
|
|
||||||
mkdir -p $(DIRS)
|
|
||||||
|
|
||||||
# Object rules
|
|
||||||
obj/%.o : %.c
|
|
||||||
$(CC) $(CFLAGS) $(INCLUDES) $(DEFINES) -c "$<" -o "$@" -Wno-unused-result -fvisibility=hidden
|
|
||||||
|
|
||||||
obj/%.o : %.cpp
|
|
||||||
$(CXX) $(CFLAGS) $(INCLUDES) $(DEFINES) -c "$<" -o "$@"
|
|
||||||
|
|
||||||
|
|
||||||
default: $(BINARIES)
|
|
||||||
|
|
||||||
.PHONY: depend clean list install
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(RM) $(OBJS) $(OBJS_CPP) $(BINARIES) ../loader/*.o ../loader/*.a ../loader/*.so $(LOADER)
|
|
||||||
|
|
||||||
list:
|
|
||||||
@echo Sources:
|
|
||||||
@echo $(SRCS)
|
|
||||||
@echo C++ Sources:
|
|
||||||
@echo $(SRCS_CPP)
|
|
||||||
@echo Objects:
|
|
||||||
@echo $(OBJS) $(OBJS_CPP)
|
|
||||||
@echo Dirs:
|
|
||||||
@echo $(DIRS)
|
|
||||||
@echo Dependencies:
|
|
||||||
@echo $(DEPS)
|
|
||||||
|
|
||||||
# Simple install rule
|
|
||||||
install: $(BINARIES)
|
|
||||||
mkdir -p $(INSTALL_DIR)
|
|
||||||
|
|
||||||
ifeq ($(XASH_SINGLE_BINARY),1)
|
|
||||||
cp xash $(INSTALL_DIR)/xash_bin
|
|
||||||
else
|
|
||||||
cp libxash.so $(INSTALL_DIR)/
|
|
||||||
cp libloader.so $(INSTALL_DIR)/
|
|
||||||
endif
|
|
||||||
@@ -1,269 +0,0 @@
|
|||||||
**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*
|
|
||||||
|
|
||||||
- [Building](#building)
|
|
||||||
- [Manual build (without CMake)](#manual-build-without-cmake)
|
|
||||||
- [Building Engine](#building-engine)
|
|
||||||
- [Building launch binary](#building-launch-binary)
|
|
||||||
- [Building on Windows](#building-on-windows)
|
|
||||||
- [Visual Studio 2013 (recommended for Windows)](#visual-studio-2013-recommended-for-windows)
|
|
||||||
- [Visual Studio 6](#visual-studio-6)
|
|
||||||
- [MinGW](#mingw)
|
|
||||||
- [Building Game mods](#building-game-mods)
|
|
||||||
- [Linux](#linux)
|
|
||||||
- [microndk](#microndk)
|
|
||||||
- [Makefile.linux](#makefile-linux)
|
|
||||||
- [Windows](#windows)
|
|
||||||
- [Running](#running)
|
|
||||||
- [Manual running](#manual-running)
|
|
||||||
- [Running with GDB](#running-with-gdb)
|
|
||||||
- [Using DLL Loader](#using-dll-loader)
|
|
||||||
- [Running MinGW builds](#running-mingw-builds)
|
|
||||||
- [Running MinGW builds under GDB](#running-mingw-builds-under-gdb)
|
|
||||||
|
|
||||||
# Building
|
|
||||||
|
|
||||||
## Manual build (without CMake)
|
|
||||||
|
|
||||||
### Building engine
|
|
||||||
|
|
||||||
Clone Xash3D repository using git:
|
|
||||||
|
|
||||||
git clone https://github.com/FWGS/xash3d
|
|
||||||
|
|
||||||
Move to the Xash3D folder:
|
|
||||||
|
|
||||||
cd xash3d/engine
|
|
||||||
|
|
||||||
make -f Makefile.linux XASH_VGUI=1
|
|
||||||
|
|
||||||
or same for dedicated
|
|
||||||
|
|
||||||
make -f Makefile.linux XASH_DEDICATED=1
|
|
||||||
|
|
||||||
To enable dll support on linux, build loader library:
|
|
||||||
|
|
||||||
cd ../loader
|
|
||||||
make -f Makefile.linux libloader.so libloader.a
|
|
||||||
cp libloader.so libloader.a ../engine/
|
|
||||||
|
|
||||||
And built engine with XASH_DLL_LOADER=1:
|
|
||||||
|
|
||||||
cd ../engine
|
|
||||||
make -f Makefile.linux XASH_VGUI=1 XASH_SDL=1 XASH_DLL_LOADER=1
|
|
||||||
|
|
||||||
or same for dedicated server
|
|
||||||
|
|
||||||
cd ../engine
|
|
||||||
make -f Makefile.linux XASH_DEDICATED=1 XASH_DLL_LOADER=1
|
|
||||||
|
|
||||||
### Building engine in separate library
|
|
||||||
|
|
||||||
Some old distros does not support hidden symbol visibility
|
|
||||||
This results in crash when loading server library
|
|
||||||
|
|
||||||
Building launch binary
|
|
||||||
|
|
||||||
cd (xash3d)/game_launch
|
|
||||||
gcc xash.c -o xash -ldl -lrt -lm
|
|
||||||
|
|
||||||
Building engine library:
|
|
||||||
|
|
||||||
make -f Makefile.linux XASH_SINGLE_BINARY=0
|
|
||||||
|
|
||||||
## Building on Windows
|
|
||||||
|
|
||||||
### Visual Studio 2013 (recommended for Windows)
|
|
||||||
|
|
||||||
Download latest prebuilt SDL2 from
|
|
||||||
|
|
||||||
https://www.libsdl.org/release/SDL2-devel-2.0.4-VC.zip
|
|
||||||
|
|
||||||
Unzip and rename `SDL2-2.0.4` folder to `SDL2` and put it next to xash3d project folder.
|
|
||||||
|
|
||||||
..\xash3d\
|
|
||||||
..\SDL2\
|
|
||||||
|
|
||||||
Open `xash.sln` with Visual Studio 2013 and make a build. After building, copy contents of `Debug` or
|
|
||||||
`Release` folder to directory you choose. Copy `valve` folder and `vgui.dll` from your Half Life game
|
|
||||||
installation folder and `SDL2.dll` form `\SDL2\lib\x86\` to it.
|
|
||||||
Move `vgui_support.dll` into `valve` folder.
|
|
||||||
|
|
||||||
..\valve\
|
|
||||||
..\valve\vgui_support.dll
|
|
||||||
..\menu.dll
|
|
||||||
..\SDL2.dll
|
|
||||||
..\vgui.dll
|
|
||||||
..\xash.dll
|
|
||||||
..\xash.exe
|
|
||||||
|
|
||||||
Now you good to go, just run `xash.exe`.
|
|
||||||
|
|
||||||
### Visual Studio 6
|
|
||||||
|
|
||||||
This is legacy configuration, but msvc6 seems to generate more stable and more effective code
|
|
||||||
|
|
||||||
Setup your msvc6 enviroment, unpack SDL2-2.0.4 to xash3d folder and do:
|
|
||||||
|
|
||||||
cd (xash3d)\engine
|
|
||||||
..\msvc6\build.bat
|
|
||||||
cd (xash3d)\game_launch
|
|
||||||
..\msvc6\build_launch.bat
|
|
||||||
|
|
||||||
### MinGW
|
|
||||||
|
|
||||||
The most effective configuration, but maybe unstable.
|
|
||||||
Setup your MinGW environment and run:
|
|
||||||
|
|
||||||
cd (xash3d)\engine\
|
|
||||||
CC=gcc mingw32-make -f Makefile.mingw
|
|
||||||
|
|
||||||
engine will be built to single exe binary
|
|
||||||
|
|
||||||
## Building game mods
|
|
||||||
|
|
||||||
### Linux
|
|
||||||
|
|
||||||
#### microndk
|
|
||||||
|
|
||||||
All mods that ported to android may be build to linux using Android.mk with microndk:
|
|
||||||
|
|
||||||
[https://github.com/SDLash3D/microndk]
|
|
||||||
|
|
||||||
Clone microndk repo somewhere, change xash3d_config to preffered configuration (change arch to x86
|
|
||||||
for example)
|
|
||||||
|
|
||||||
Go to dlls folder if you are building server or cl_dlls if you are building client and do:
|
|
||||||
|
|
||||||
make -f /path/to/microndk/microndk.mk -j4
|
|
||||||
|
|
||||||
Do:
|
|
||||||
|
|
||||||
make -f /path/to/microndk/microndk.mk -j4 clean
|
|
||||||
|
|
||||||
every time when you build client after building server
|
|
||||||
|
|
||||||
#### Makefile.linux
|
|
||||||
|
|
||||||
### Windows
|
|
||||||
|
|
||||||
On windows common way is using Visual Studio as many mods does not correctly work with mingw.
|
|
||||||
|
|
||||||
Just open project and build it.
|
|
||||||
|
|
||||||
Other is using mingw and microndk, but it was not tested yet.
|
|
||||||
|
|
||||||
hlsdk-xash3d based mods may work fine with mingw.
|
|
||||||
|
|
||||||
You may use microndk to build it. Build process is very similar to linux one.
|
|
||||||
|
|
||||||
After setting up MinGW enviroment, do:<br>
|
|
||||||
`mingw32-make -f \path\to\microndk\Microndk.mk`
|
|
||||||
|
|
||||||
to build 64-bit library, use:<br>
|
|
||||||
`mingw32-make -f \path\to\microndk\Microndk.mk 64BIT=1`
|
|
||||||
|
|
||||||
Edit xash3d_config.mk to set optimal CFLAGS if you are running server
|
|
||||||
|
|
||||||
# Running
|
|
||||||
|
|
||||||
Copy **valve** folder from Half-Life:
|
|
||||||
|
|
||||||
cp -r $HOME/.steam/steam/steamapps/common/Half-Life/valve $HOME/Games/Xash3D
|
|
||||||
|
|
||||||
**NOTE**: If you build with CMake, you can now use `make install`. It will install binaries where
|
|
||||||
they must be located. So just run `xash3d` from command line in directory where is gamedata is located.
|
|
||||||
For additional info look to the CMakeLists.txt in repo root and xash3d.sh script.
|
|
||||||
|
|
||||||
After a successful build, copy the next files to some other directory where you want to run Xash3D:
|
|
||||||
|
|
||||||
cp engine/libxash.so game_launch/xash3d mainui/libxashmenu.so $HOME/Games/Xash3D
|
|
||||||
|
|
||||||
If you built it with XASH_VGUI, also copy vgui.so:
|
|
||||||
|
|
||||||
cp ../hlsdk/linux/vgui.so vgui_support/libvgui_support.so $HOME/Games/Xash3D
|
|
||||||
|
|
||||||
Copy script:
|
|
||||||
|
|
||||||
cp ../xash3d.sh $HOME/Games/Xash3D
|
|
||||||
|
|
||||||
Run:
|
|
||||||
|
|
||||||
cd $HOME/Games/Xash3D
|
|
||||||
./xash3d.sh
|
|
||||||
|
|
||||||
## Manual running
|
|
||||||
|
|
||||||
Put xash3d binaries and vgui(optionally) to you game data directory and run:
|
|
||||||
|
|
||||||
LD_LIBRARY_PATH=. ./xash -dev 5
|
|
||||||
|
|
||||||
## Running under GDB
|
|
||||||
|
|
||||||
LD_LIBRARY_PATH=. gdb --args ./xash -dev 5
|
|
||||||
|
|
||||||
## Using DLL Loader
|
|
||||||
|
|
||||||
Put vgui_support.dll from windows build to your game data folder and run:
|
|
||||||
|
|
||||||
LD_LIBRARY_PATH=. ./xash -dev 5 -vguilib vgui.dll -clientlib valve/cl_dlls/client.dll -dll dlls/hl.dll
|
|
||||||
|
|
||||||
## Running MinGW builds
|
|
||||||
|
|
||||||
Put exe file to your game data directory
|
|
||||||
|
|
||||||
cd (game)\
|
|
||||||
xash_bin -dev 5
|
|
||||||
|
|
||||||
### Running MinGW builds under GDB
|
|
||||||
|
|
||||||
gdb --args ./xash_bin.exe -dev 5
|
|
||||||
|
|
||||||
# Useful GDB commands
|
|
||||||
|
|
||||||
Start or restart process:
|
|
||||||
|
|
||||||
(gdb) r
|
|
||||||
|
|
||||||
Show backtrace:
|
|
||||||
|
|
||||||
(gdb) bt
|
|
||||||
|
|
||||||
Full backtrace:
|
|
||||||
|
|
||||||
(gdb) bt full
|
|
||||||
|
|
||||||
Continue execution:
|
|
||||||
|
|
||||||
(gdb) c
|
|
||||||
|
|
||||||
Recover from segmentation fault:
|
|
||||||
|
|
||||||
Skipping function:
|
|
||||||
|
|
||||||
(gdb) handle SIGSEGV nopass
|
|
||||||
(gdb) ret
|
|
||||||
(gdb) c
|
|
||||||
|
|
||||||
Restart frame for beginning:
|
|
||||||
|
|
||||||
(gdb) handle SIGSEGV nopass
|
|
||||||
(gdb) jump *Host_AbortCurrentFrame
|
|
||||||
Anti-Crash script (useful for scripting servers):
|
|
||||||
```
|
|
||||||
cd /path/to/rootdir
|
|
||||||
file xash
|
|
||||||
set args xash -dev 5 -nowcon
|
|
||||||
handle SIGSEGV nopass
|
|
||||||
catch signal SIGSEGV
|
|
||||||
set $crashes=0
|
|
||||||
commands
|
|
||||||
print $crashes++
|
|
||||||
if $crashes > 500
|
|
||||||
set $crashes=0
|
|
||||||
run
|
|
||||||
else
|
|
||||||
jump *Host_AbortCurrentFrame
|
|
||||||
end
|
|
||||||
end
|
|
||||||
run
|
|
||||||
```
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
SCRIPTDIR=$(dirname "$0")
|
|
||||||
TOPDIR=$SCRIPTDIR/../../
|
|
||||||
cp $SCRIPTDIR/Makefile.dllloader $TOPDIR/loader/
|
|
||||||
cp $SCRIPTDIR/Makefile.emscripten $TOPDIR/engine/
|
|
||||||
cp $SCRIPTDIR/Makefile.linux $TOPDIR/engine/
|
|
||||||
cp $SCRIPTDIR/wscript $TOPDIR/engine/
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
#! /usr/bin/env python
|
|
||||||
# encoding: utf-8
|
|
||||||
# mittorn, 2018
|
|
||||||
|
|
||||||
VERSION='0.99'
|
|
||||||
APPNAME='xash3d-fwgs'
|
|
||||||
|
|
||||||
top = '.'
|
|
||||||
|
|
||||||
def options(opt):
|
|
||||||
opt.load('compiler_c')
|
|
||||||
# opt.load('msvs')
|
|
||||||
opt.add_option('--dedicated', action = 'store_true', help = 'build dedicated server only' )
|
|
||||||
opt.add_option('--64bits', dest = 'amd64', action = 'store_true', help = 'build 64-bit engine on x86_64' )
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def configure(conf):
|
|
||||||
conf.load('compiler_c')
|
|
||||||
conf.env.append_unique('CFLAGS', '-O2')
|
|
||||||
conf.env.append_unique('DEFINES', 'SINGLE_BINARY')
|
|
||||||
conf.env.append_value('LINKFLAGS', '-ldl')
|
|
||||||
conf.env.append_value('LINKFLAGS', '-lm')
|
|
||||||
conf.env.append_value('LINKFLAGS', '-pthread')
|
|
||||||
|
|
||||||
# check for 64-bit builds
|
|
||||||
# TODO: check 32-bit toolchain and dependencies
|
|
||||||
if conf.env.DEST_CPU == 'x86_64' and not conf.options.amd64:
|
|
||||||
conf.env.append_value('LINKFLAGS', '-m32')
|
|
||||||
conf.env.append_value('CFLAGS', '-m32')
|
|
||||||
print('NOTE: will build engine with 64-bit toolchain using -m32')
|
|
||||||
else:
|
|
||||||
print('Warning: 64bit engine may be unstable')
|
|
||||||
|
|
||||||
# check for dedicated server build
|
|
||||||
if conf.options.dedicated:
|
|
||||||
conf.env.append_unique('DEFINES', 'XASH_DEDICATED')
|
|
||||||
conf.env.dedicated = True
|
|
||||||
else:
|
|
||||||
# TODO: add way to specify SDL2 path, move to separate function
|
|
||||||
try:
|
|
||||||
conf.check_cfg(path='sdl2-config', args='--cflags --libs', package='', msg='Checking for SDL2', uselib_store='SDL2')
|
|
||||||
except conf.errors.ConfigurationError:
|
|
||||||
conf.fatal('SDL2 not availiable! If you want to build dedicated server, specify --dedicated')
|
|
||||||
conf.env.append_unique('DEFINES', 'XASH_SDL')
|
|
||||||
|
|
||||||
def build(bld):
|
|
||||||
# basic build: dedicated only, no dependencies
|
|
||||||
use = [];
|
|
||||||
source = bld.path.ant_glob([
|
|
||||||
'common/*.c',
|
|
||||||
'common/imagelib/*.c',
|
|
||||||
'common/soundlib/*.c',
|
|
||||||
'common/soundlib/libmpg/*.c',
|
|
||||||
'server/*.c'])
|
|
||||||
|
|
||||||
# add client files and sdl2 library
|
|
||||||
if not bld.env.dedicated:
|
|
||||||
use += ['SDL2']
|
|
||||||
source += bld.path.ant_glob([
|
|
||||||
'client/*.c',
|
|
||||||
'client/vgui/*.c',
|
|
||||||
'client/avi/*.c',
|
|
||||||
'platform/sdl/*.c'])
|
|
||||||
|
|
||||||
|
|
||||||
bld(
|
|
||||||
target = 'xash',
|
|
||||||
features = 'c cprogram',
|
|
||||||
includes = ['../common', '../pm_shared', 'common', 'server', 'client', 'client/vgui', '.' ],
|
|
||||||
source = source,
|
|
||||||
use = use
|
|
||||||
)
|
|
||||||
@@ -16,6 +16,10 @@
|
|||||||
#ifndef ALIAS_H
|
#ifndef ALIAS_H
|
||||||
#define ALIAS_H
|
#define ALIAS_H
|
||||||
|
|
||||||
|
#include "build.h"
|
||||||
|
#include STDINT_H
|
||||||
|
#include "synctype.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
@@ -39,16 +43,6 @@ Alias models are position independent, so the cache manager can move them.
|
|||||||
#define ALIAS_TRACER2 0x0040 // orange split trail + rotate
|
#define ALIAS_TRACER2 0x0040 // orange split trail + rotate
|
||||||
#define ALIAS_TRACER3 0x0080 // purple trail
|
#define ALIAS_TRACER3 0x0080 // purple trail
|
||||||
|
|
||||||
// must match definition in sprite.h
|
|
||||||
#ifndef SYNCTYPE_T
|
|
||||||
#define SYNCTYPE_T
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
ST_SYNC = 0,
|
|
||||||
ST_RAND
|
|
||||||
} synctype_t;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
ALIAS_SINGLE = 0,
|
ALIAS_SINGLE = 0,
|
||||||
@@ -63,36 +57,42 @@ typedef enum
|
|||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int ident;
|
int32_t ident;
|
||||||
int version;
|
int32_t version;
|
||||||
vec3_t scale;
|
vec3_t scale;
|
||||||
vec3_t scale_origin;
|
vec3_t scale_origin;
|
||||||
float boundingradius;
|
float boundingradius;
|
||||||
vec3_t eyeposition;
|
vec3_t eyeposition;
|
||||||
int numskins;
|
int32_t numskins;
|
||||||
int skinwidth;
|
int32_t skinwidth;
|
||||||
int skinheight;
|
int32_t skinheight;
|
||||||
int numverts;
|
int32_t numverts;
|
||||||
int numtris;
|
int32_t numtris;
|
||||||
int numframes;
|
int32_t numframes;
|
||||||
synctype_t synctype;
|
uint32_t synctype; // was synctype_t
|
||||||
int flags;
|
int32_t flags;
|
||||||
float size;
|
float size;
|
||||||
} daliashdr_t;
|
} daliashdr_t;
|
||||||
|
|
||||||
|
STATIC_CHECK_SIZEOF( daliashdr_t, 84, 84 );
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int onseam;
|
int32_t onseam;
|
||||||
int s;
|
int32_t s;
|
||||||
int t;
|
int32_t t;
|
||||||
} stvert_t;
|
} stvert_t;
|
||||||
|
|
||||||
|
STATIC_CHECK_SIZEOF( stvert_t, 12, 12 );
|
||||||
|
|
||||||
typedef struct dtriangle_s
|
typedef struct dtriangle_s
|
||||||
{
|
{
|
||||||
int facesfront;
|
int32_t facesfront;
|
||||||
int vertindex[3];
|
int32_t vertindex[3];
|
||||||
} dtriangle_t;
|
} dtriangle_t;
|
||||||
|
|
||||||
|
STATIC_CHECK_SIZEOF( dtriangle_t, 16, 16 );
|
||||||
|
|
||||||
#define DT_FACES_FRONT 0x0010
|
#define DT_FACES_FRONT 0x0010
|
||||||
#define ALIAS_ONSEAM 0x0020
|
#define ALIAS_ONSEAM 0x0020
|
||||||
|
|
||||||
@@ -103,36 +103,50 @@ typedef struct
|
|||||||
char name[16]; // frame name from grabbing
|
char name[16]; // frame name from grabbing
|
||||||
} daliasframe_t;
|
} daliasframe_t;
|
||||||
|
|
||||||
|
STATIC_CHECK_SIZEOF( daliasframe_t, 24, 24 );
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int numframes;
|
int32_t numframes;
|
||||||
trivertex_t bboxmin; // lightnormal isn't used
|
trivertex_t bboxmin; // lightnormal isn't used
|
||||||
trivertex_t bboxmax; // lightnormal isn't used
|
trivertex_t bboxmax; // lightnormal isn't used
|
||||||
} daliasgroup_t;
|
} daliasgroup_t;
|
||||||
|
|
||||||
|
STATIC_CHECK_SIZEOF( daliasgroup_t, 12, 12 );
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int numskins;
|
int32_t numskins;
|
||||||
} daliasskingroup_t;
|
} daliasskingroup_t;
|
||||||
|
|
||||||
|
STATIC_CHECK_SIZEOF( daliasskingroup_t, 4, 4 );
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
float interval;
|
float interval;
|
||||||
} daliasinterval_t;
|
} daliasinterval_t;
|
||||||
|
|
||||||
|
STATIC_CHECK_SIZEOF( daliasinterval_t, 4, 4 );
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
float interval;
|
float interval;
|
||||||
} daliasskininterval_t;
|
} daliasskininterval_t;
|
||||||
|
|
||||||
|
STATIC_CHECK_SIZEOF( daliasskininterval_t, 4, 4 );
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
aliasframetype_t type;
|
uint32_t type; // was aliasframetype_t
|
||||||
} daliasframetype_t;
|
} daliasframetype_t;
|
||||||
|
|
||||||
|
STATIC_CHECK_SIZEOF( daliasframetype_t, 4, 4 );
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
aliasskintype_t type;
|
uint32_t type; // was aliasskintype_t
|
||||||
} daliasskintype_t;
|
} daliasskintype_t;
|
||||||
|
|
||||||
|
STATIC_CHECK_SIZEOF( daliasskintype_t, 4, 4 );
|
||||||
|
|
||||||
#endif//ALIAS_H
|
#endif//ALIAS_H
|
||||||
|
|||||||
@@ -1,18 +1,22 @@
|
|||||||
/***
|
/*
|
||||||
*
|
Copyright (C) 1996-1997 Id Software, Inc.
|
||||||
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
|
|
||||||
*
|
|
||||||
* This product contains software technology licensed from Id
|
|
||||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
|
||||||
* All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Use, distribution, and modification of this source code and/or resulting
|
|
||||||
* object code is restricted to non-commercial enhancements to products from
|
|
||||||
* Valve LLC. All other use, distribution, or modification is prohibited
|
|
||||||
* without written permission from Valve LLC.
|
|
||||||
*
|
|
||||||
****/
|
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
*/
|
||||||
{-0.525731, 0.000000, 0.850651},
|
{-0.525731, 0.000000, 0.850651},
|
||||||
{-0.442863, 0.238856, 0.864188},
|
{-0.442863, 0.238856, 0.864188},
|
||||||
{-0.295242, 0.000000, 0.955423},
|
{-0.295242, 0.000000, 0.955423},
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ int AVI_GetAudioChunk( movie_state_t *Avi, char *audiodata, int offset, int leng
|
|||||||
void AVI_OpenVideo( movie_state_t *Avi, const char *filename, qboolean load_audio, int quiet );
|
void AVI_OpenVideo( movie_state_t *Avi, const char *filename, qboolean load_audio, int quiet );
|
||||||
movie_state_t *AVI_LoadVideo( const char *filename, qboolean load_audio );
|
movie_state_t *AVI_LoadVideo( const char *filename, qboolean load_audio );
|
||||||
int AVI_TimeToSoundPosition( movie_state_t *Avi, int time );
|
int AVI_TimeToSoundPosition( movie_state_t *Avi, int time );
|
||||||
int AVI_GetVideoFrameCount( movie_state_t *Avi );
|
|
||||||
void AVI_CloseVideo( movie_state_t *Avi );
|
void AVI_CloseVideo( movie_state_t *Avi );
|
||||||
qboolean AVI_IsActive( movie_state_t *Avi );
|
qboolean AVI_IsActive( movie_state_t *Avi );
|
||||||
void AVI_FreeVideo( movie_state_t *Avi );
|
void AVI_FreeVideo( movie_state_t *Avi );
|
||||||
|
|||||||
@@ -57,11 +57,6 @@ int AVI_TimeToSoundPosition( movie_state_t *Avi, int time )
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int AVI_GetVideoFrameCount( movie_state_t *Avi )
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void AVI_CloseVideo( movie_state_t *Avi )
|
void AVI_CloseVideo( movie_state_t *Avi )
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
avi_win.c - playing AVI files (based on original AVIKit code, Win32 version)
|
avi_win.c - playing AVI files (based on original AVIKit code, Win32 version)
|
||||||
|
Copyright (c) 2003-2004, Ruari O'Sullivan
|
||||||
Copyright (C) 2010 Uncle Mike
|
Copyright (C) 2010 Uncle Mike
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
@@ -63,7 +64,7 @@ static int (_stdcall *pAVIStreamTimeToSample)( PAVISTREAM pavi, LONG lTime );
|
|||||||
static void* (_stdcall *pAVIStreamGetFrame)( PGETFRAME pg, LONG lPos );
|
static void* (_stdcall *pAVIStreamGetFrame)( PGETFRAME pg, LONG lPos );
|
||||||
static int (_stdcall *pAVIStreamGetFrameClose)( PGETFRAME pg );
|
static int (_stdcall *pAVIStreamGetFrameClose)( PGETFRAME pg );
|
||||||
static dword (_stdcall *pAVIStreamRelease)( PAVISTREAM pavi );
|
static dword (_stdcall *pAVIStreamRelease)( PAVISTREAM pavi );
|
||||||
static int (_stdcall *pAVIFileOpen)( PAVIFILE *ppfile, LPCSTR szFile, UINT uMode, LPCLSID lpHandler );
|
static int (_stdcall *pAVIFileOpenW)( PAVIFILE *ppfile, LPCWSTR szFile, UINT uMode, LPCLSID lpHandler );
|
||||||
static int (_stdcall *pAVIFileGetStream)( PAVIFILE pfile, PAVISTREAM *ppavi, DWORD fccType, LONG lParam );
|
static int (_stdcall *pAVIFileGetStream)( PAVIFILE pfile, PAVISTREAM *ppavi, DWORD fccType, LONG lParam );
|
||||||
static int (_stdcall *pAVIStreamReadFormat)( PAVISTREAM pavi, LONG lPos,LPVOID lpFormat, LONG *lpcbFormat );
|
static int (_stdcall *pAVIStreamReadFormat)( PAVISTREAM pavi, LONG lPos,LPVOID lpFormat, LONG *lpcbFormat );
|
||||||
static int (_stdcall *pAVIStreamStart)( PAVISTREAM pavi );
|
static int (_stdcall *pAVIStreamStart)( PAVISTREAM pavi );
|
||||||
@@ -76,7 +77,7 @@ static dllfunc_t avifile_funcs[] =
|
|||||||
{ "AVIFileExit", (void **) &pAVIFileExit },
|
{ "AVIFileExit", (void **) &pAVIFileExit },
|
||||||
{ "AVIFileGetStream", (void **) &pAVIFileGetStream },
|
{ "AVIFileGetStream", (void **) &pAVIFileGetStream },
|
||||||
{ "AVIFileInit", (void **) &pAVIFileInit },
|
{ "AVIFileInit", (void **) &pAVIFileInit },
|
||||||
{ "AVIFileOpenA", (void **) &pAVIFileOpen },
|
{ "AVIFileOpenW", (void **) &pAVIFileOpenW },
|
||||||
{ "AVIFileRelease", (void **) &pAVIFileRelease },
|
{ "AVIFileRelease", (void **) &pAVIFileRelease },
|
||||||
{ "AVIStreamGetFrame", (void **) &pAVIStreamGetFrame },
|
{ "AVIStreamGetFrame", (void **) &pAVIStreamGetFrame },
|
||||||
{ "AVIStreamGetFrameClose", (void **) &pAVIStreamGetFrameClose },
|
{ "AVIStreamGetFrameClose", (void **) &pAVIStreamGetFrameClose },
|
||||||
@@ -278,14 +279,6 @@ int AVI_GetVideoFrameNumber( movie_state_t *Avi, float time )
|
|||||||
return (time * Avi->video_fps);
|
return (time * Avi->video_fps);
|
||||||
}
|
}
|
||||||
|
|
||||||
int AVI_GetVideoFrameCount( movie_state_t *Avi )
|
|
||||||
{
|
|
||||||
if( !Avi->active )
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return Avi->video_frames;
|
|
||||||
}
|
|
||||||
|
|
||||||
int AVI_TimeToSoundPosition( movie_state_t *Avi, int time )
|
int AVI_TimeToSoundPosition( movie_state_t *Avi, int time )
|
||||||
{
|
{
|
||||||
if( !Avi->active || !Avi->audio_stream )
|
if( !Avi->active || !Avi->audio_stream )
|
||||||
@@ -493,6 +486,7 @@ void AVI_OpenVideo( movie_state_t *Avi, const char *filename, qboolean load_audi
|
|||||||
AVISTREAMINFO stream_info;
|
AVISTREAMINFO stream_info;
|
||||||
int opened_streams = 0;
|
int opened_streams = 0;
|
||||||
LONG hr;
|
LONG hr;
|
||||||
|
wchar_t pathBuffer[MAX_PATH];
|
||||||
|
|
||||||
// default state: non-working.
|
// default state: non-working.
|
||||||
Avi->active = false;
|
Avi->active = false;
|
||||||
@@ -501,8 +495,15 @@ void AVI_OpenVideo( movie_state_t *Avi, const char *filename, qboolean load_audi
|
|||||||
// can't load Video For Windows :-(
|
// can't load Video For Windows :-(
|
||||||
if( !avi_initialized ) return;
|
if( !avi_initialized ) return;
|
||||||
|
|
||||||
|
// convert to wide char
|
||||||
|
if( MultiByteToWideChar( CP_UTF8, 0, filename, -1, pathBuffer, ARRAYSIZE( pathBuffer )) <= 0 )
|
||||||
|
{
|
||||||
|
Con_DPrintf( S_ERROR "filename buffer limit exceeded\n" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// load the AVI
|
// load the AVI
|
||||||
hr = pAVIFileOpen( &Avi->pfile, filename, OF_SHARE_DENY_WRITE, 0L );
|
hr = pAVIFileOpenW( &Avi->pfile, pathBuffer, OF_SHARE_DENY_WRITE, 0L );
|
||||||
|
|
||||||
if( hr != 0 ) // error opening AVI:
|
if( hr != 0 ) // error opening AVI:
|
||||||
{
|
{
|
||||||
@@ -657,7 +658,7 @@ movie_state_t *AVI_LoadVideo( const char *filename, qboolean load_audio )
|
|||||||
|
|
||||||
// open cinematic
|
// open cinematic
|
||||||
Q_snprintf( path, sizeof( path ), "media/%s", filename );
|
Q_snprintf( path, sizeof( path ), "media/%s", filename );
|
||||||
COM_DefaultExtension( path, ".avi" );
|
COM_DefaultExtension( path, ".avi", sizeof( path ));
|
||||||
fullpath = FS_GetDiskPath( path, false );
|
fullpath = FS_GetDiskPath( path, false );
|
||||||
|
|
||||||
if( FS_FileExists( path, false ) && !fullpath )
|
if( FS_FileExists( path, false ) && !fullpath )
|
||||||
|
|||||||
@@ -85,6 +85,12 @@ void CL_PlayCDTrack_f( void )
|
|||||||
paused = false;
|
paused = false;
|
||||||
looped = false;
|
looped = false;
|
||||||
}
|
}
|
||||||
|
else if( !Q_stricmp( command, "playfile" ))
|
||||||
|
{
|
||||||
|
S_StartBackgroundTrack( pszTrack, NULL, 0, true );
|
||||||
|
paused = false;
|
||||||
|
looped = false;
|
||||||
|
}
|
||||||
else if( !Q_stricmp( command, "loop" ))
|
else if( !Q_stricmp( command, "loop" ))
|
||||||
{
|
{
|
||||||
if( Q_isdigit( pszTrack ))
|
if( Q_isdigit( pszTrack ))
|
||||||
@@ -96,6 +102,12 @@ void CL_PlayCDTrack_f( void )
|
|||||||
paused = false;
|
paused = false;
|
||||||
looped = true;
|
looped = true;
|
||||||
}
|
}
|
||||||
|
else if( !Q_stricmp( command, "loopfile" ))
|
||||||
|
{
|
||||||
|
S_StartBackgroundTrack( pszTrack, pszTrack, 0, true );
|
||||||
|
paused = false;
|
||||||
|
looped = true;
|
||||||
|
}
|
||||||
else if( !Q_stricmp( command, "pause" ))
|
else if( !Q_stricmp( command, "pause" ))
|
||||||
{
|
{
|
||||||
S_StreamSetPause( true );
|
S_StreamSetPause( true );
|
||||||
@@ -145,36 +157,12 @@ void CL_PlayCDTrack_f( void )
|
|||||||
CL_ScreenshotGetName
|
CL_ScreenshotGetName
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
qboolean CL_ScreenshotGetName( int lastnum, char *filename )
|
static qboolean CL_ScreenshotGetName( const char *fmt, int lastnum, char *filename, size_t size )
|
||||||
{
|
{
|
||||||
if( lastnum < 0 || lastnum > 9999 )
|
if( lastnum < 0 || lastnum > 9999 )
|
||||||
{
|
|
||||||
Con_Printf( S_ERROR "unable to write screenshot\n" );
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
Q_sprintf( filename, "scrshots/%s_shot%04d.png", clgame.mapname, lastnum );
|
return Q_snprintf( filename, size, fmt, clgame.mapname, lastnum ) > 0;
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
==================
|
|
||||||
CL_SnapshotGetName
|
|
||||||
==================
|
|
||||||
*/
|
|
||||||
qboolean CL_SnapshotGetName( int lastnum, char *filename )
|
|
||||||
{
|
|
||||||
if( lastnum < 0 || lastnum > 9999 )
|
|
||||||
{
|
|
||||||
Con_Printf( S_ERROR "unable to write snapshot\n" );
|
|
||||||
FS_AllowDirectPaths( false );
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Q_sprintf( filename, "../%s_%04d.png", clgame.mapname, lastnum );
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -184,127 +172,6 @@ qboolean CL_SnapshotGetName( int lastnum, char *filename )
|
|||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
*/
|
*/
|
||||||
/*
|
|
||||||
==================
|
|
||||||
CL_ScreenShot_f
|
|
||||||
|
|
||||||
normal screenshot
|
|
||||||
==================
|
|
||||||
*/
|
|
||||||
void CL_ScreenShot_f( void )
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
string checkname;
|
|
||||||
|
|
||||||
if( CL_IsDevOverviewMode() == 1 )
|
|
||||||
{
|
|
||||||
// special case for write overview image and script file
|
|
||||||
Q_snprintf( cls.shotname, sizeof( cls.shotname ), "overviews/%s.bmp", clgame.mapname );
|
|
||||||
cls.scrshot_action = scrshot_mapshot; // build new frame for mapshot
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// scan for a free filename
|
|
||||||
for( i = 0; i < 9999; i++ )
|
|
||||||
{
|
|
||||||
if( !CL_ScreenshotGetName( i, checkname ))
|
|
||||||
return; // no namespace
|
|
||||||
|
|
||||||
if( !FS_FileExists( checkname, false ))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
Q_strncpy( cls.shotname, checkname, sizeof( cls.shotname ));
|
|
||||||
cls.scrshot_action = scrshot_normal; // build new frame for screenshot
|
|
||||||
}
|
|
||||||
|
|
||||||
cls.envshot_vieworg = NULL; // no custom view
|
|
||||||
cls.envshot_viewsize = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
==================
|
|
||||||
CL_SnapShot_f
|
|
||||||
|
|
||||||
save screenshots into root dir
|
|
||||||
==================
|
|
||||||
*/
|
|
||||||
void CL_SnapShot_f( void )
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
string checkname;
|
|
||||||
|
|
||||||
if( CL_IsDevOverviewMode() == 1 )
|
|
||||||
{
|
|
||||||
// special case for write overview image and script file
|
|
||||||
Q_snprintf( cls.shotname, sizeof( cls.shotname ), "overviews/%s.bmp", clgame.mapname );
|
|
||||||
cls.scrshot_action = scrshot_mapshot; // build new frame for mapshot
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
FS_AllowDirectPaths( true );
|
|
||||||
|
|
||||||
// scan for a free filename
|
|
||||||
for( i = 0; i < 9999; i++ )
|
|
||||||
{
|
|
||||||
if( !CL_SnapshotGetName( i, checkname ))
|
|
||||||
return; // no namespace
|
|
||||||
|
|
||||||
if( !FS_FileExists( checkname, false ))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
FS_AllowDirectPaths( false );
|
|
||||||
Q_strncpy( cls.shotname, checkname, sizeof( cls.shotname ));
|
|
||||||
cls.scrshot_action = scrshot_snapshot; // build new frame for screenshot
|
|
||||||
}
|
|
||||||
|
|
||||||
cls.envshot_vieworg = NULL; // no custom view
|
|
||||||
cls.envshot_viewsize = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
==================
|
|
||||||
CL_EnvShot_f
|
|
||||||
|
|
||||||
cubemap view
|
|
||||||
==================
|
|
||||||
*/
|
|
||||||
void CL_EnvShot_f( void )
|
|
||||||
{
|
|
||||||
if( Cmd_Argc() < 2 )
|
|
||||||
{
|
|
||||||
Con_Printf( S_USAGE "envshot <shotname>\n" );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Q_sprintf( cls.shotname, "gfx/env/%s", Cmd_Argv( 1 ));
|
|
||||||
cls.scrshot_action = scrshot_envshot; // build new frame for envshot
|
|
||||||
cls.envshot_vieworg = NULL; // no custom view
|
|
||||||
cls.envshot_viewsize = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
==================
|
|
||||||
CL_SkyShot_f
|
|
||||||
|
|
||||||
skybox view
|
|
||||||
==================
|
|
||||||
*/
|
|
||||||
void CL_SkyShot_f( void )
|
|
||||||
{
|
|
||||||
if( Cmd_Argc() < 2 )
|
|
||||||
{
|
|
||||||
Con_Printf( S_USAGE "skyshot <shotname>\n" );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Q_sprintf( cls.shotname, "gfx/env/%s", Cmd_Argv( 1 ));
|
|
||||||
cls.scrshot_action = scrshot_skyshot; // build new frame for skyshot
|
|
||||||
cls.envshot_vieworg = NULL; // no custom view
|
|
||||||
cls.envshot_viewsize = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==================
|
==================
|
||||||
CL_LevelShot_f
|
CL_LevelShot_f
|
||||||
@@ -323,7 +190,8 @@ void CL_LevelShot_f( void )
|
|||||||
// check for exist
|
// check for exist
|
||||||
if( cls.demoplayback && ( cls.demonum != -1 ))
|
if( cls.demoplayback && ( cls.demonum != -1 ))
|
||||||
{
|
{
|
||||||
Q_sprintf( cls.shotname, "levelshots/%s_%s.bmp", cls.demoname, refState.wideScreen ? "16x9" : "4x3" );
|
Q_snprintf( cls.shotname, sizeof( cls.shotname ),
|
||||||
|
"levelshots/%s_%s.bmp", cls.demoname, refState.wideScreen ? "16x9" : "4x3" );
|
||||||
Q_snprintf( filename, sizeof( filename ), "%s.dem", cls.demoname );
|
Q_snprintf( filename, sizeof( filename ), "%s.dem", cls.demoname );
|
||||||
|
|
||||||
// make sure what levelshot is newer than demo
|
// make sure what levelshot is newer than demo
|
||||||
@@ -332,7 +200,8 @@ void CL_LevelShot_f( void )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Q_sprintf( cls.shotname, "levelshots/%s_%s.bmp", clgame.mapname, refState.wideScreen ? "16x9" : "4x3" );
|
Q_snprintf( cls.shotname, sizeof( cls.shotname ),
|
||||||
|
"levelshots/%s_%s.bmp", clgame.mapname, refState.wideScreen ? "16x9" : "4x3" );
|
||||||
|
|
||||||
// make sure what levelshot is newer than bsp
|
// make sure what levelshot is newer than bsp
|
||||||
ft1 = FS_FileTime( cl.worldmodel->name, false );
|
ft1 = FS_FileTime( cl.worldmodel->name, false );
|
||||||
@@ -345,23 +214,107 @@ void CL_LevelShot_f( void )
|
|||||||
else cls.scrshot_action = scrshot_inactive; // disable - not needs
|
else cls.scrshot_action = scrshot_inactive; // disable - not needs
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
static scrshot_t CL_GetScreenshotTypeFromString( const char *string )
|
||||||
==================
|
|
||||||
CL_SaveShot_f
|
|
||||||
|
|
||||||
mini-pic in loadgame menu
|
|
||||||
==================
|
|
||||||
*/
|
|
||||||
void CL_SaveShot_f( void )
|
|
||||||
{
|
{
|
||||||
if( Cmd_Argc() < 2 )
|
if( !Q_stricmp( string, "snapshot" ))
|
||||||
|
return scrshot_snapshot;
|
||||||
|
|
||||||
|
if( !Q_stricmp( string, "screenshot" ))
|
||||||
|
return scrshot_normal;
|
||||||
|
|
||||||
|
if( !Q_stricmp( string, "saveshot" ))
|
||||||
|
return scrshot_savegame;
|
||||||
|
|
||||||
|
if( !Q_stricmp( string, "envshot" ))
|
||||||
|
return scrshot_envshot;
|
||||||
|
|
||||||
|
if( !Q_stricmp( string, "skyshot" ))
|
||||||
|
return scrshot_skyshot;
|
||||||
|
|
||||||
|
return scrshot_inactive;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CL_GenericShot_f( void )
|
||||||
|
{
|
||||||
|
const char *argv0 = Cmd_Argv( 0 );
|
||||||
|
scrshot_t type;
|
||||||
|
|
||||||
|
type = CL_GetScreenshotTypeFromString( argv0 );
|
||||||
|
|
||||||
|
if( type == scrshot_normal || type == scrshot_snapshot )
|
||||||
{
|
{
|
||||||
Con_Printf( S_USAGE "saveshot <savename>\n" );
|
if( CL_IsDevOverviewMode() == 1 )
|
||||||
return;
|
type = scrshot_mapshot;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if( Cmd_Argc() < 2 )
|
||||||
|
{
|
||||||
|
Con_Printf( S_USAGE "%s <shotname>\n", argv0 );
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_sprintf( cls.shotname, DEFAULT_SAVE_DIRECTORY "%s.bmp", Cmd_Argv( 1 ));
|
switch( type )
|
||||||
cls.scrshot_action = scrshot_savegame; // build new frame for saveshot
|
{
|
||||||
|
case scrshot_envshot:
|
||||||
|
case scrshot_skyshot:
|
||||||
|
Q_snprintf( cls.shotname, sizeof( cls.shotname ), "gfx/env/%s", Cmd_Argv( 1 ));
|
||||||
|
break;
|
||||||
|
case scrshot_savegame:
|
||||||
|
Q_snprintf( cls.shotname, sizeof( cls.shotname ), DEFAULT_SAVE_DIRECTORY "%s.bmp", Cmd_Argv( 1 ));
|
||||||
|
break;
|
||||||
|
case scrshot_mapshot:
|
||||||
|
Q_snprintf( cls.shotname, sizeof( cls.shotname ), "overviews/%s.bmp", clgame.mapname );
|
||||||
|
break;
|
||||||
|
case scrshot_normal:
|
||||||
|
case scrshot_snapshot:
|
||||||
|
{
|
||||||
|
const char *fmt;
|
||||||
|
string checkname;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
// allow overriding screenshot by users request
|
||||||
|
if( Cmd_Argc() > 1 )
|
||||||
|
{
|
||||||
|
Q_strncpy( cls.shotname, Cmd_Argv( 1 ), sizeof( cls.shotname ));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( type == scrshot_snapshot )
|
||||||
|
{
|
||||||
|
fmt = "../%s_%04d.png";
|
||||||
|
FS_AllowDirectPaths( true );
|
||||||
|
}
|
||||||
|
else fmt = "scrshots/%s_shot%04d.png";
|
||||||
|
|
||||||
|
for( i = 0; i < 9999; i++ )
|
||||||
|
{
|
||||||
|
if( !CL_ScreenshotGetName( fmt, i, checkname, sizeof( checkname )))
|
||||||
|
{
|
||||||
|
Con_Printf( S_ERROR "unable to write %s\n", argv0 );
|
||||||
|
FS_AllowDirectPaths( false );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !FS_FileExists( checkname, true ))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
FS_AllowDirectPaths( false );
|
||||||
|
|
||||||
|
Q_strncpy( cls.shotname, checkname, sizeof( cls.shotname ));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case scrshot_inactive:
|
||||||
|
case scrshot_plaque:
|
||||||
|
default:
|
||||||
|
return; // shouldn't happen
|
||||||
|
}
|
||||||
|
|
||||||
|
cls.scrshot_action = type; // build new frame for saveshot
|
||||||
|
cls.envshot_vieworg = NULL;
|
||||||
|
cls.envshot_viewsize = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -403,7 +356,7 @@ void CL_SetSky_f( void )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ref.dllFuncs.R_SetupSky( Cmd_Argv( 1 ));
|
R_SetupSky( Cmd_Argv( 1 ));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -70,16 +70,17 @@ qboolean CL_CheckFile( sizebuf_t *msg, resource_t *pResource )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( cl.downloadUrl[0] )
|
host.downloadcount++;
|
||||||
|
|
||||||
|
if( cl.http_download )
|
||||||
{
|
{
|
||||||
HTTP_AddDownload( filepath, pResource->nDownloadSize, true );
|
HTTP_AddDownload( filepath, pResource->nDownloadSize, true );
|
||||||
host.downloadcount++;
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
MSG_BeginClientCmd( msg, clc_stringcmd );
|
{
|
||||||
MSG_WriteString( msg, va( "dlfile %s", filepath ));
|
MSG_BeginClientCmd( msg, clc_stringcmd );
|
||||||
host.downloadcount++;
|
MSG_WriteStringf( msg, "dlfile %s", filepath );
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -104,7 +105,7 @@ void CL_AddToResourceList( resource_t *pResource, resource_t *pList )
|
|||||||
void CL_RemoveFromResourceList( resource_t *pResource )
|
void CL_RemoveFromResourceList( resource_t *pResource )
|
||||||
{
|
{
|
||||||
if( pResource->pPrev == NULL || pResource->pNext == NULL )
|
if( pResource->pPrev == NULL || pResource->pNext == NULL )
|
||||||
Host_Error( "mislinked resource in CL_RemoveFromResourceList\n" );
|
Host_Error( "mislinked resource in %s\n", __func__ );
|
||||||
|
|
||||||
if( pResource->pNext == pResource || pResource->pPrev == pResource )
|
if( pResource->pNext == pResource || pResource->pPrev == pResource )
|
||||||
Host_Error( "attempt to free last entry in list.\n" );
|
Host_Error( "attempt to free last entry in list.\n" );
|
||||||
@@ -119,7 +120,7 @@ void CL_MoveToOnHandList( resource_t *pResource )
|
|||||||
{
|
{
|
||||||
if( !pResource )
|
if( !pResource )
|
||||||
{
|
{
|
||||||
Con_Reportf( "Null resource passed to CL_MoveToOnHandList\n" );
|
Con_Reportf( "Null resource passed to %s\n", __func__ );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,7 +128,7 @@ void CL_MoveToOnHandList( resource_t *pResource )
|
|||||||
CL_AddToResourceList( pResource, &cl.resourcesonhand );
|
CL_AddToResourceList( pResource, &cl.resourcesonhand );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CL_ClearResourceList( resource_t *pList )
|
static void CL_ClearResourceList( resource_t *pList )
|
||||||
{
|
{
|
||||||
resource_t *p, *n;
|
resource_t *p, *n;
|
||||||
|
|
||||||
|
|||||||
@@ -25,70 +25,6 @@ GNU General Public License for more details.
|
|||||||
#define MSG_COUNT 32 // last 32 messages parsed
|
#define MSG_COUNT 32 // last 32 messages parsed
|
||||||
#define MSG_MASK (MSG_COUNT - 1)
|
#define MSG_MASK (MSG_COUNT - 1)
|
||||||
|
|
||||||
const char *svc_strings[svc_lastmsg+1] =
|
|
||||||
{
|
|
||||||
"svc_bad",
|
|
||||||
"svc_nop",
|
|
||||||
"svc_disconnect",
|
|
||||||
"svc_event",
|
|
||||||
"svc_changing",
|
|
||||||
"svc_setview",
|
|
||||||
"svc_sound",
|
|
||||||
"svc_time",
|
|
||||||
"svc_print",
|
|
||||||
"svc_stufftext",
|
|
||||||
"svc_setangle",
|
|
||||||
"svc_serverdata",
|
|
||||||
"svc_lightstyle",
|
|
||||||
"svc_updateuserinfo",
|
|
||||||
"svc_deltatable",
|
|
||||||
"svc_clientdata",
|
|
||||||
"svc_resource",
|
|
||||||
"svc_pings",
|
|
||||||
"svc_particle",
|
|
||||||
"svc_restoresound",
|
|
||||||
"svc_spawnstatic",
|
|
||||||
"svc_event_reliable",
|
|
||||||
"svc_spawnbaseline",
|
|
||||||
"svc_temp_entity",
|
|
||||||
"svc_setpause",
|
|
||||||
"svc_signonnum",
|
|
||||||
"svc_centerprint",
|
|
||||||
"svc_unused27",
|
|
||||||
"svc_unused28",
|
|
||||||
"svc_unused29",
|
|
||||||
"svc_intermission",
|
|
||||||
"svc_finale",
|
|
||||||
"svc_cdtrack",
|
|
||||||
"svc_restore",
|
|
||||||
"svc_cutscene",
|
|
||||||
"svc_weaponanim",
|
|
||||||
"svc_bspdecal",
|
|
||||||
"svc_roomtype",
|
|
||||||
"svc_addangle",
|
|
||||||
"svc_usermessage",
|
|
||||||
"svc_packetentities",
|
|
||||||
"svc_deltapacketentities",
|
|
||||||
"svc_choke",
|
|
||||||
"svc_resourcelist",
|
|
||||||
"svc_deltamovevars",
|
|
||||||
"svc_resourcerequest",
|
|
||||||
"svc_customization",
|
|
||||||
"svc_crosshairangle",
|
|
||||||
"svc_soundfade",
|
|
||||||
"svc_filetxferfailed",
|
|
||||||
"svc_hltv",
|
|
||||||
"svc_director",
|
|
||||||
"svc_voiceinit",
|
|
||||||
"svc_voicedata",
|
|
||||||
"svc_deltapacketbones",
|
|
||||||
"svc_unused55",
|
|
||||||
"svc_resourcelocation",
|
|
||||||
"svc_querycvarvalue",
|
|
||||||
"svc_querycvarvalue2",
|
|
||||||
"svc_exec",
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int command;
|
int command;
|
||||||
@@ -109,12 +45,34 @@ const char *CL_MsgInfo( int cmd )
|
|||||||
{
|
{
|
||||||
static string sz;
|
static string sz;
|
||||||
|
|
||||||
Q_strcpy( sz, "???" );
|
Q_strncpy( sz, "???", sizeof( sz ));
|
||||||
|
|
||||||
if( cmd >= 0 && cmd <= svc_lastmsg )
|
if( cmd >= 0 && cmd <= svc_lastmsg )
|
||||||
{
|
{
|
||||||
// get engine message name
|
// get engine message name
|
||||||
Q_strncpy( sz, svc_strings[cmd], sizeof( sz ));
|
const char *svc_string = NULL;
|
||||||
|
|
||||||
|
switch( cls.legacymode )
|
||||||
|
{
|
||||||
|
case PROTO_CURRENT:
|
||||||
|
svc_string = svc_strings[cmd];
|
||||||
|
break;
|
||||||
|
case PROTO_LEGACY:
|
||||||
|
svc_string = svc_legacy_strings[cmd];
|
||||||
|
break;
|
||||||
|
case PROTO_QUAKE:
|
||||||
|
svc_string = svc_quake_strings[cmd];
|
||||||
|
break;
|
||||||
|
case PROTO_GOLDSRC:
|
||||||
|
svc_string = svc_goldsrc_strings[cmd];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// fall back to current protocol strings
|
||||||
|
if( !svc_string )
|
||||||
|
svc_string = svc_strings[cmd];
|
||||||
|
|
||||||
|
Q_strncpy( sz, svc_string, sizeof( sz ));
|
||||||
}
|
}
|
||||||
else if( cmd > svc_lastmsg && cmd <= ( svc_lastmsg + MAX_USER_MESSAGES ))
|
else if( cmd > svc_lastmsg && cmd <= ( svc_lastmsg + MAX_USER_MESSAGES ))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ GNU General Public License for more details.
|
|||||||
#define IDEMOHEADER (('M'<<24)+('E'<<16)+('D'<<8)+'I') // little-endian "IDEM"
|
#define IDEMOHEADER (('M'<<24)+('E'<<16)+('D'<<8)+'I') // little-endian "IDEM"
|
||||||
#define DEMO_PROTOCOL 3
|
#define DEMO_PROTOCOL 3
|
||||||
|
|
||||||
|
#define PROTOCOL_GOLDSRC_VERSION_DEMO (PROTOCOL_GOLDSRC_VERSION | (BIT( 7 ))) // should be 48, only to differentiate it from PROTOCOL_LEGACY_VERSION
|
||||||
|
|
||||||
const char *demo_cmd[dem_lastcmd+1] =
|
const char *demo_cmd[dem_lastcmd+1] =
|
||||||
{
|
{
|
||||||
"dem_unknown",
|
"dem_unknown",
|
||||||
@@ -79,7 +81,7 @@ typedef struct
|
|||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
demoentry_t *entries; // track entry info
|
demoentry_t *entries; // track entry info
|
||||||
int numentries; // number of tracks
|
int32_t numentries; // number of tracks
|
||||||
} demodirectory_t;
|
} demodirectory_t;
|
||||||
|
|
||||||
// add angles
|
// add angles
|
||||||
@@ -107,6 +109,42 @@ struct
|
|||||||
int angle_position;
|
int angle_position;
|
||||||
} demo;
|
} demo;
|
||||||
|
|
||||||
|
static qboolean CL_NextDemo( void );
|
||||||
|
|
||||||
|
static int CL_GetDemoNetProtocol( connprotocol_t proto )
|
||||||
|
{
|
||||||
|
switch( proto )
|
||||||
|
{
|
||||||
|
case PROTO_CURRENT:
|
||||||
|
return PROTOCOL_VERSION;
|
||||||
|
case PROTO_LEGACY:
|
||||||
|
return PROTOCOL_LEGACY_VERSION;
|
||||||
|
case PROTO_QUAKE:
|
||||||
|
return PROTOCOL_VERSION_QUAKE;
|
||||||
|
case PROTO_GOLDSRC:
|
||||||
|
return PROTOCOL_GOLDSRC_VERSION_DEMO;
|
||||||
|
}
|
||||||
|
|
||||||
|
return PROTOCOL_VERSION;
|
||||||
|
}
|
||||||
|
|
||||||
|
static connprotocol_t CL_GetProtocolFromDemo( int net_protocol )
|
||||||
|
{
|
||||||
|
switch( net_protocol )
|
||||||
|
{
|
||||||
|
case PROTOCOL_VERSION:
|
||||||
|
return PROTO_CURRENT;
|
||||||
|
case PROTOCOL_LEGACY_VERSION:
|
||||||
|
return PROTO_LEGACY;
|
||||||
|
case PROTOCOL_VERSION_QUAKE:
|
||||||
|
return PROTO_QUAKE;
|
||||||
|
case PROTOCOL_GOLDSRC_VERSION_DEMO:
|
||||||
|
return PROTO_GOLDSRC;
|
||||||
|
}
|
||||||
|
|
||||||
|
return PROTO_CURRENT;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
====================
|
====================
|
||||||
CL_StartupDemoHeader
|
CL_StartupDemoHeader
|
||||||
@@ -117,12 +155,8 @@ we record a demo on this level
|
|||||||
*/
|
*/
|
||||||
void CL_StartupDemoHeader( void )
|
void CL_StartupDemoHeader( void )
|
||||||
{
|
{
|
||||||
if( cls.demoheader )
|
CL_CloseDemoHeader();
|
||||||
{
|
|
||||||
FS_Close( cls.demoheader );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Note: this is replacing tmpfile()
|
|
||||||
cls.demoheader = FS_Open( "demoheader.tmp", "w+b", true );
|
cls.demoheader = FS_Open( "demoheader.tmp", "w+b", true );
|
||||||
|
|
||||||
if( !cls.demoheader )
|
if( !cls.demoheader )
|
||||||
@@ -156,7 +190,7 @@ CL_GetDemoRecordClock
|
|||||||
write time while demo is recording
|
write time while demo is recording
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
float CL_GetDemoRecordClock( void )
|
static float CL_GetDemoRecordClock( void )
|
||||||
{
|
{
|
||||||
return cl.mtime[0];
|
return cl.mtime[0];
|
||||||
}
|
}
|
||||||
@@ -168,7 +202,7 @@ CL_GetDemoPlaybackClock
|
|||||||
overwrite host.realtime
|
overwrite host.realtime
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
float CL_GetDemoPlaybackClock( void )
|
static float CL_GetDemoPlaybackClock( void )
|
||||||
{
|
{
|
||||||
return host.realtime + host.frametime;
|
return host.realtime + host.frametime;
|
||||||
}
|
}
|
||||||
@@ -194,7 +228,7 @@ CL_WriteDemoCmdHeader
|
|||||||
Writes the demo command header and time-delta
|
Writes the demo command header and time-delta
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
void CL_WriteDemoCmdHeader( byte cmd, file_t *file )
|
static void CL_WriteDemoCmdHeader( byte cmd, file_t *file )
|
||||||
{
|
{
|
||||||
float dt;
|
float dt;
|
||||||
|
|
||||||
@@ -267,7 +301,7 @@ Save state of cls.netchan sequences
|
|||||||
so that we can play the demo correctly.
|
so that we can play the demo correctly.
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
void CL_WriteDemoSequence( file_t *file )
|
static void CL_WriteDemoSequence( file_t *file )
|
||||||
{
|
{
|
||||||
Assert( file != NULL );
|
Assert( file != NULL );
|
||||||
|
|
||||||
@@ -295,10 +329,6 @@ void CL_WriteDemoMessage( qboolean startup, int start, sizebuf_t *msg )
|
|||||||
|
|
||||||
if( !file ) return;
|
if( !file ) return;
|
||||||
|
|
||||||
// past the start but not recording a demo.
|
|
||||||
if( !startup && !cls.demorecording )
|
|
||||||
return;
|
|
||||||
|
|
||||||
swlen = MSG_GetNumBytesWritten( msg ) - start;
|
swlen = MSG_GetNumBytesWritten( msg ) - start;
|
||||||
if( swlen <= 0 ) return;
|
if( swlen <= 0 ) return;
|
||||||
|
|
||||||
@@ -348,7 +378,7 @@ CL_WriteDemoHeader
|
|||||||
Write demo header
|
Write demo header
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
void CL_WriteDemoHeader( const char *name )
|
static void CL_WriteDemoHeader( const char *name )
|
||||||
{
|
{
|
||||||
int copysize;
|
int copysize;
|
||||||
int savepos;
|
int savepos;
|
||||||
@@ -371,8 +401,8 @@ void CL_WriteDemoHeader( const char *name )
|
|||||||
|
|
||||||
demo.header.id = IDEMOHEADER;
|
demo.header.id = IDEMOHEADER;
|
||||||
demo.header.dem_protocol = DEMO_PROTOCOL;
|
demo.header.dem_protocol = DEMO_PROTOCOL;
|
||||||
demo.header.net_protocol = cls.legacymode ? PROTOCOL_LEGACY_VERSION : PROTOCOL_VERSION;
|
demo.header.net_protocol = CL_GetDemoNetProtocol( cls.legacymode );
|
||||||
demo.header.host_fps = bound( MIN_FPS, host_maxfps->value, MAX_FPS );
|
demo.header.host_fps = host_maxfps.value ? bound( MIN_FPS, host_maxfps.value, MAX_FPS ) : MAX_FPS;
|
||||||
Q_strncpy( demo.header.mapname, clgame.mapname, sizeof( demo.header.mapname ));
|
Q_strncpy( demo.header.mapname, clgame.mapname, sizeof( demo.header.mapname ));
|
||||||
Q_strncpy( demo.header.comment, clgame.maptitle, sizeof( demo.header.comment ));
|
Q_strncpy( demo.header.comment, clgame.maptitle, sizeof( demo.header.comment ));
|
||||||
Q_strncpy( demo.header.gamedir, FS_Gamedir(), sizeof( demo.header.gamedir ));
|
Q_strncpy( demo.header.gamedir, FS_Gamedir(), sizeof( demo.header.gamedir ));
|
||||||
@@ -391,6 +421,7 @@ void CL_WriteDemoHeader( const char *name )
|
|||||||
|
|
||||||
// finish off the startup info.
|
// finish off the startup info.
|
||||||
CL_WriteDemoCmdHeader( dem_stop, cls.demoheader );
|
CL_WriteDemoCmdHeader( dem_stop, cls.demoheader );
|
||||||
|
FS_Flush( cls.demoheader );
|
||||||
|
|
||||||
// now copy the stuff we cached from the server.
|
// now copy the stuff we cached from the server.
|
||||||
copysize = savepos = FS_Tell( cls.demoheader );
|
copysize = savepos = FS_Tell( cls.demoheader );
|
||||||
@@ -436,7 +467,7 @@ CL_StopRecord
|
|||||||
finish recording demo
|
finish recording demo
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void CL_StopRecord( void )
|
static void CL_StopRecord( void )
|
||||||
{
|
{
|
||||||
int i, curpos;
|
int i, curpos;
|
||||||
float stoptime;
|
float stoptime;
|
||||||
@@ -518,14 +549,26 @@ CL_ReadDemoCmdHeader
|
|||||||
read the demo command
|
read the demo command
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void CL_ReadDemoCmdHeader( byte *cmd, float *dt )
|
static qboolean CL_ReadDemoCmdHeader( byte *cmd, float *dt )
|
||||||
{
|
{
|
||||||
// read the command
|
// read the command
|
||||||
FS_Read( cls.demofile, cmd, sizeof( byte ));
|
// HACKHACK: skip NOPs
|
||||||
Assert( *cmd >= 1 && *cmd <= dem_lastcmd );
|
do
|
||||||
|
{
|
||||||
|
FS_Read( cls.demofile, cmd, sizeof( byte ));
|
||||||
|
} while( *cmd == dem_unknown );
|
||||||
|
|
||||||
|
if( *cmd > dem_lastcmd )
|
||||||
|
{
|
||||||
|
Con_Printf( S_ERROR "Demo cmd %d > %d, file offset = %d\n", *cmd, dem_lastcmd, (int)FS_Tell( cls.demofile ));
|
||||||
|
CL_DemoCompleted();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// read the timestamp
|
// read the timestamp
|
||||||
FS_Read( cls.demofile, dt, sizeof( float ));
|
FS_Read( cls.demofile, dt, sizeof( float ));
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -536,7 +579,7 @@ read the demo usercmd for predicting
|
|||||||
and smooth movement during playback the demo
|
and smooth movement during playback the demo
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void CL_ReadDemoUserCmd( qboolean discard )
|
static void CL_ReadDemoUserCmd( qboolean discard )
|
||||||
{
|
{
|
||||||
byte data[1024];
|
byte data[1024];
|
||||||
int cmdnumber;
|
int cmdnumber;
|
||||||
@@ -558,6 +601,9 @@ void CL_ReadDemoUserCmd( qboolean discard )
|
|||||||
memset( &nullcmd, 0, sizeof( nullcmd ));
|
memset( &nullcmd, 0, sizeof( nullcmd ));
|
||||||
MSG_Init( &buf, "UserCmd", data, sizeof( data ));
|
MSG_Init( &buf, "UserCmd", data, sizeof( data ));
|
||||||
|
|
||||||
|
// a1ba: I have no proper explanation why
|
||||||
|
cmdnumber++;
|
||||||
|
|
||||||
pcmd = &cl.commands[cmdnumber & CL_UPDATE_MASK];
|
pcmd = &cl.commands[cmdnumber & CL_UPDATE_MASK];
|
||||||
pcmd->processedfuncs = false;
|
pcmd->processedfuncs = false;
|
||||||
pcmd->senttime = 0.0f;
|
pcmd->senttime = 0.0f;
|
||||||
@@ -598,7 +644,7 @@ CL_ReadDemoSequence
|
|||||||
read netchan sequences
|
read netchan sequences
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void CL_ReadDemoSequence( qboolean discard )
|
static void CL_ReadDemoSequence( qboolean discard )
|
||||||
{
|
{
|
||||||
int incoming_sequence;
|
int incoming_sequence;
|
||||||
int incoming_acknowledged;
|
int incoming_acknowledged;
|
||||||
@@ -632,15 +678,17 @@ void CL_ReadDemoSequence( qboolean discard )
|
|||||||
CL_DemoStartPlayback
|
CL_DemoStartPlayback
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void CL_DemoStartPlayback( int mode )
|
static void CL_DemoStartPlayback( int mode )
|
||||||
{
|
{
|
||||||
if( cls.changedemo )
|
if( cls.changedemo )
|
||||||
{
|
{
|
||||||
|
int maxclients = cl.maxclients;
|
||||||
|
|
||||||
S_StopAllSounds( true );
|
S_StopAllSounds( true );
|
||||||
SCR_BeginLoadingPlaque( false );
|
SCR_BeginLoadingPlaque( false );
|
||||||
|
|
||||||
CL_ClearState ();
|
CL_ClearState( );
|
||||||
CL_InitEdicts (); // re-arrange edicts
|
CL_InitEdicts( maxclients ); // re-arrange edicts
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -660,7 +708,7 @@ void CL_DemoStartPlayback( int mode )
|
|||||||
|
|
||||||
demo.starttime = CL_GetDemoPlaybackClock(); // for determining whether to read another message
|
demo.starttime = CL_GetDemoPlaybackClock(); // for determining whether to read another message
|
||||||
|
|
||||||
Netchan_Setup( NS_CLIENT, &cls.netchan, net_from, Cvar_VariableInteger( "net_qport" ), NULL, CL_GetFragmentSize );
|
Netchan_Setup( NS_CLIENT, &cls.netchan, net_from, Cvar_VariableInteger( "net_qport" ), NULL, CL_GetFragmentSize, 0 );
|
||||||
|
|
||||||
memset( demo.cmds, 0, sizeof( demo.cmds ));
|
memset( demo.cmds, 0, sizeof( demo.cmds ));
|
||||||
demo.angle_position = 1;
|
demo.angle_position = 1;
|
||||||
@@ -675,7 +723,7 @@ void CL_DemoStartPlayback( int mode )
|
|||||||
CL_DemoAborted
|
CL_DemoAborted
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void CL_DemoAborted( void )
|
static void CL_DemoAborted( void )
|
||||||
{
|
{
|
||||||
if( cls.demofile )
|
if( cls.demofile )
|
||||||
FS_Close( cls.demofile );
|
FS_Close( cls.demofile );
|
||||||
@@ -686,7 +734,7 @@ void CL_DemoAborted( void )
|
|||||||
cls.demofile = NULL;
|
cls.demofile = NULL;
|
||||||
cls.demonum = -1;
|
cls.demonum = -1;
|
||||||
|
|
||||||
Cvar_SetValue( "v_dark", 0.0f );
|
Cvar_DirectSet( &v_dark, "0" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -704,7 +752,7 @@ void CL_DemoCompleted( void )
|
|||||||
if( !CL_NextDemo() && !cls.changedemo )
|
if( !CL_NextDemo() && !cls.changedemo )
|
||||||
UI_SetActiveMenu( true );
|
UI_SetActiveMenu( true );
|
||||||
|
|
||||||
Cvar_SetValue( "v_dark", 0.0f );
|
Cvar_DirectSet( &v_dark, "0" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -715,7 +763,7 @@ returns true on success, false on failure
|
|||||||
g-cont. probably captain obvious mode is ON
|
g-cont. probably captain obvious mode is ON
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
qboolean CL_DemoMoveToNextSection( void )
|
static qboolean CL_DemoMoveToNextSection( void )
|
||||||
{
|
{
|
||||||
if( ++demo.entryIndex >= demo.directory.numentries )
|
if( ++demo.entryIndex >= demo.directory.numentries )
|
||||||
{
|
{
|
||||||
@@ -737,7 +785,7 @@ qboolean CL_DemoMoveToNextSection( void )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qboolean CL_ReadRawNetworkData( byte *buffer, size_t *length )
|
static qboolean CL_ReadRawNetworkData( byte *buffer, size_t *length )
|
||||||
{
|
{
|
||||||
int msglen = 0;
|
int msglen = 0;
|
||||||
|
|
||||||
@@ -788,7 +836,7 @@ CL_DemoReadMessageQuake
|
|||||||
reads demo data and write it to client
|
reads demo data and write it to client
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
qboolean CL_DemoReadMessageQuake( byte *buffer, size_t *length )
|
static qboolean CL_DemoReadMessageQuake( byte *buffer, size_t *length )
|
||||||
{
|
{
|
||||||
vec3_t viewangles;
|
vec3_t viewangles;
|
||||||
int msglen = 0;
|
int msglen = 0;
|
||||||
@@ -913,7 +961,8 @@ qboolean CL_DemoReadMessage( byte *buffer, size_t *length )
|
|||||||
if( !cls.demofile ) break;
|
if( !cls.demofile ) break;
|
||||||
curpos = FS_Tell( cls.demofile );
|
curpos = FS_Tell( cls.demofile );
|
||||||
|
|
||||||
CL_ReadDemoCmdHeader( &cmd, &demo.timestamp );
|
if( !CL_ReadDemoCmdHeader( &cmd, &demo.timestamp ))
|
||||||
|
return false;
|
||||||
|
|
||||||
fElapsedTime = CL_GetDemoPlaybackClock() - demo.starttime;
|
fElapsedTime = CL_GetDemoPlaybackClock() - demo.starttime;
|
||||||
if( !cls.timedemo ) bSkipMessage = ((demo.timestamp - cl_serverframetime()) >= fElapsedTime) ? true : false;
|
if( !cls.timedemo ) bSkipMessage = ((demo.timestamp - cl_serverframetime()) >= fElapsedTime) ? true : false;
|
||||||
@@ -1002,7 +1051,7 @@ qboolean CL_DemoReadMessage( byte *buffer, size_t *length )
|
|||||||
return CL_ReadRawNetworkData( buffer, length );
|
return CL_ReadRawNetworkData( buffer, length );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CL_DemoFindInterpolatedViewAngles( float t, float *frac, demoangle_t **prev, demoangle_t **next )
|
static void CL_DemoFindInterpolatedViewAngles( float t, float *frac, demoangle_t **prev, demoangle_t **next )
|
||||||
{
|
{
|
||||||
int i, i0, i1, imod;
|
int i, i0, i1, imod;
|
||||||
float at;
|
float at;
|
||||||
@@ -1097,8 +1146,9 @@ CL_FinishTimeDemo
|
|||||||
show stats
|
show stats
|
||||||
==============
|
==============
|
||||||
*/
|
*/
|
||||||
void CL_FinishTimeDemo( void )
|
static void CL_FinishTimeDemo( void )
|
||||||
{
|
{
|
||||||
|
qboolean temp = host.allow_console;
|
||||||
int frames;
|
int frames;
|
||||||
double time;
|
double time;
|
||||||
|
|
||||||
@@ -1109,7 +1159,12 @@ void CL_FinishTimeDemo( void )
|
|||||||
time = host.realtime - cls.td_starttime;
|
time = host.realtime - cls.td_starttime;
|
||||||
if( !time ) time = 1.0;
|
if( !time ) time = 1.0;
|
||||||
|
|
||||||
Con_Printf( "%i frames %5.3f seconds %5.3f fps\n", frames, time, frames / time );
|
host.allow_console = true;
|
||||||
|
Con_Printf( "timedemo result: %i frames %5.3f seconds %5.3f fps\n", frames, time, frames / time );
|
||||||
|
host.allow_console = temp;
|
||||||
|
|
||||||
|
if( Sys_CheckParm( "-timedemo" ))
|
||||||
|
CL_Quit_f();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1243,7 +1298,7 @@ CL_NextDemo
|
|||||||
Called when a demo finishes
|
Called when a demo finishes
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
qboolean CL_NextDemo( void )
|
static qboolean CL_NextDemo( void )
|
||||||
{
|
{
|
||||||
char str[MAX_QPATH];
|
char str[MAX_QPATH];
|
||||||
|
|
||||||
@@ -1293,7 +1348,7 @@ void CL_CheckStartupDemos( void )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// run demos loop in background mode
|
// run demos loop in background mode
|
||||||
Cvar_SetValue( "v_dark", 1.0f );
|
Cvar_DirectSet( &v_dark, "1" );
|
||||||
cls.demos_pending = false;
|
cls.demos_pending = false;
|
||||||
cls.demonum = 0;
|
cls.demonum = 0;
|
||||||
CL_NextDemo ();
|
CL_NextDemo ();
|
||||||
@@ -1304,16 +1359,16 @@ void CL_CheckStartupDemos( void )
|
|||||||
CL_DemoGetName
|
CL_DemoGetName
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
static void CL_DemoGetName( int lastnum, char *filename )
|
static void CL_DemoGetName( int lastnum, char *filename, size_t size )
|
||||||
{
|
{
|
||||||
if( lastnum < 0 || lastnum > 9999 )
|
if( lastnum < 0 || lastnum > 9999 )
|
||||||
{
|
{
|
||||||
// bound
|
// bound
|
||||||
Q_strcpy( filename, "demo9999" );
|
Q_strncpy( filename, "demo9999", size );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_sprintf( filename, "demo%04d", lastnum );
|
Q_snprintf( filename, size, "demo%04d", lastnum );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1367,8 +1422,10 @@ void CL_Record_f( void )
|
|||||||
// scan for a free filename
|
// scan for a free filename
|
||||||
for( n = 0; n < 10000; n++ )
|
for( n = 0; n < 10000; n++ )
|
||||||
{
|
{
|
||||||
CL_DemoGetName( n, demoname );
|
CL_DemoGetName( n, demoname, sizeof( demoname ));
|
||||||
if( !FS_FileExists( va( "%s.dem", demoname ), true ))
|
Q_snprintf( demopath, sizeof( demopath ), "%s.dem", demoname );
|
||||||
|
|
||||||
|
if( !FS_FileExists( demopath, true ))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1381,7 +1438,7 @@ void CL_Record_f( void )
|
|||||||
else Q_strncpy( demoname, name, sizeof( demoname ));
|
else Q_strncpy( demoname, name, sizeof( demoname ));
|
||||||
|
|
||||||
// open the demo file
|
// open the demo file
|
||||||
Q_sprintf( demopath, "%s.dem", demoname );
|
Q_snprintf( demopath, sizeof( demopath ), "%s.dem", demoname );
|
||||||
|
|
||||||
// make sure that old demo is removed
|
// make sure that old demo is removed
|
||||||
if( FS_FileExists( demopath, false ))
|
if( FS_FileExists( demopath, false ))
|
||||||
@@ -1393,6 +1450,51 @@ void CL_Record_f( void )
|
|||||||
CL_WriteDemoHeader( demopath );
|
CL_WriteDemoHeader( demopath );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static qboolean CL_ParseDemoHeader( const char *callee, const char *filename, file_t *f, demoheader_t *hdr, int32_t *numentries )
|
||||||
|
{
|
||||||
|
if( FS_Read( f, hdr, sizeof( *hdr )) != sizeof( *hdr ) || hdr->id != IDEMOHEADER )
|
||||||
|
{
|
||||||
|
Con_Printf( S_ERROR "%s: %s is not in supported format or not a demo file\n", callee, filename );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// force null terminate strings
|
||||||
|
hdr->mapname[sizeof( hdr->mapname ) - 1] = 0;
|
||||||
|
hdr->comment[sizeof( hdr->comment ) - 1] = 0;
|
||||||
|
hdr->gamedir[sizeof( hdr->gamedir ) - 1] = 0;
|
||||||
|
|
||||||
|
if( hdr->dem_protocol != DEMO_PROTOCOL )
|
||||||
|
{
|
||||||
|
Con_Printf( S_ERROR "%s: demo protocol outdated (%i should be %i)\n",
|
||||||
|
callee, hdr->net_protocol, DEMO_PROTOCOL );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( hdr->net_protocol != PROTOCOL_VERSION && hdr->net_protocol != PROTOCOL_LEGACY_VERSION )
|
||||||
|
{
|
||||||
|
Con_Printf( S_ERROR "%s: net protocol outdated (%i should be %i or %i)\n",
|
||||||
|
callee, hdr->net_protocol, PROTOCOL_VERSION, PROTOCOL_LEGACY_VERSION );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( FS_Seek( f, hdr->directory_offset, SEEK_SET ) < 0
|
||||||
|
|| FS_Read( f, numentries, sizeof( *numentries )) != sizeof( *numentries ))
|
||||||
|
{
|
||||||
|
Con_Printf( S_ERROR "%s: can't find directory offset in %s, demo file corrupted\n",
|
||||||
|
callee, filename );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(( *numentries < 1 ) || ( *numentries > 1024 ))
|
||||||
|
{
|
||||||
|
Con_Printf( S_ERROR "%s: demo have bogus # of directory entries: %i\n",
|
||||||
|
callee, *numentries );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
====================
|
====================
|
||||||
CL_PlayDemo_f
|
CL_PlayDemo_f
|
||||||
@@ -1408,14 +1510,12 @@ void CL_PlayDemo_f( void )
|
|||||||
|
|
||||||
if( Cmd_Argc() < 2 )
|
if( Cmd_Argc() < 2 )
|
||||||
{
|
{
|
||||||
Con_Printf( S_USAGE "playdemo <demoname>\n" );
|
Con_Printf( S_USAGE "%s <demoname>\n", Cmd_Argv( 0 ));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( cls.demoplayback )
|
if( cls.demoplayback )
|
||||||
{
|
|
||||||
CL_StopPlayback();
|
CL_StopPlayback();
|
||||||
}
|
|
||||||
|
|
||||||
if( cls.demorecording )
|
if( cls.demorecording )
|
||||||
{
|
{
|
||||||
@@ -1455,7 +1555,7 @@ void CL_PlayDemo_f( void )
|
|||||||
{
|
{
|
||||||
int c, neg = false;
|
int c, neg = false;
|
||||||
|
|
||||||
demo.header.host_fps = host_maxfps->value;
|
demo.header.host_fps = host_maxfps.value;
|
||||||
|
|
||||||
while(( c = FS_Getc( cls.demofile )) != '\n' )
|
while(( c = FS_Getc( cls.demofile )) != '\n' )
|
||||||
{
|
{
|
||||||
@@ -1465,51 +1565,32 @@ void CL_PlayDemo_f( void )
|
|||||||
|
|
||||||
if( neg ) cls.forcetrack = -cls.forcetrack;
|
if( neg ) cls.forcetrack = -cls.forcetrack;
|
||||||
CL_DemoStartPlayback( DEMO_QUAKE1 );
|
CL_DemoStartPlayback( DEMO_QUAKE1 );
|
||||||
|
cls.legacymode = PROTO_QUAKE;
|
||||||
return; // quake demo is started
|
return; // quake demo is started
|
||||||
}
|
}
|
||||||
|
|
||||||
// read in the demo header
|
// read in the demo header
|
||||||
FS_Read( cls.demofile, &demo.header, sizeof( demoheader_t ));
|
if( !CL_ParseDemoHeader( Cmd_Argv( 0 ), filename, cls.demofile, &demo.header, &demo.directory.numentries ))
|
||||||
|
|
||||||
if( demo.header.id != IDEMOHEADER )
|
|
||||||
{
|
{
|
||||||
Con_Printf( S_ERROR "%s is not a demo file\n", demoname );
|
|
||||||
CL_DemoAborted();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( demo.header.dem_protocol != DEMO_PROTOCOL )
|
|
||||||
{
|
|
||||||
Con_Printf( S_ERROR "playdemo: demo protocol outdated (%i should be %i)\n", demo.header.dem_protocol, DEMO_PROTOCOL );
|
|
||||||
CL_DemoAborted();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( demo.header.net_protocol != PROTOCOL_VERSION &&
|
|
||||||
demo.header.net_protocol != PROTOCOL_LEGACY_VERSION )
|
|
||||||
{
|
|
||||||
Con_Printf( S_ERROR "playdemo: net protocol outdated (%i should be %i)\n", demo.header.net_protocol, PROTOCOL_VERSION );
|
|
||||||
CL_DemoAborted();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// now read in the directory structure.
|
|
||||||
FS_Seek( cls.demofile, demo.header.directory_offset, SEEK_SET );
|
|
||||||
FS_Read( cls.demofile, &demo.directory.numentries, sizeof( int ));
|
|
||||||
|
|
||||||
if( demo.directory.numentries < 1 || demo.directory.numentries > 1024 )
|
|
||||||
{
|
|
||||||
Con_Printf( S_ERROR "demo had bogus # of directory entries: %i\n", demo.directory.numentries );
|
|
||||||
CL_DemoAborted();
|
CL_DemoAborted();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// allocate demo entries
|
// allocate demo entries
|
||||||
demo.directory.entries = Mem_Malloc( cls.mempool, sizeof( demoentry_t ) * demo.directory.numentries );
|
demo.directory.entries = Mem_Malloc( cls.mempool, sizeof( *demo.directory.entries ) * demo.directory.numentries );
|
||||||
|
|
||||||
for( i = 0; i < demo.directory.numentries; i++ )
|
for( i = 0; i < demo.directory.numentries; i++ )
|
||||||
{
|
{
|
||||||
FS_Read( cls.demofile, &demo.directory.entries[i], sizeof( demoentry_t ));
|
demoentry_t *entry = &demo.directory.entries[i];
|
||||||
|
|
||||||
|
if( FS_Read( cls.demofile, entry, sizeof( *entry )) != sizeof( *entry ))
|
||||||
|
{
|
||||||
|
Con_Printf( S_ERROR "%s: demo entry %i of %s corrupted", Cmd_Argv( 0 ), i, filename );
|
||||||
|
CL_DemoAborted();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
entry->description[sizeof( entry->description ) - 1] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
demo.entryIndex = 0;
|
demo.entryIndex = 0;
|
||||||
@@ -1519,9 +1600,11 @@ void CL_PlayDemo_f( void )
|
|||||||
|
|
||||||
CL_DemoStartPlayback( DEMO_XASH3D );
|
CL_DemoStartPlayback( DEMO_XASH3D );
|
||||||
|
|
||||||
|
// must be after DemoStartPlayback, as CL_Disconnect_f resets the protocol
|
||||||
|
cls.legacymode = CL_GetProtocolFromDemo( demo.header.net_protocol );
|
||||||
|
|
||||||
// g-cont. is this need?
|
// g-cont. is this need?
|
||||||
Q_strncpy( cls.servername, demoname, sizeof( cls.servername ));
|
Q_strncpy( cls.servername, demoname, sizeof( cls.servername ));
|
||||||
cls.legacymode = demo.header.net_protocol == PROTOCOL_LEGACY_VERSION;
|
|
||||||
|
|
||||||
// begin a playback demo
|
// begin a playback demo
|
||||||
}
|
}
|
||||||
@@ -1535,12 +1618,6 @@ timedemo <demoname>
|
|||||||
*/
|
*/
|
||||||
void CL_TimeDemo_f( void )
|
void CL_TimeDemo_f( void )
|
||||||
{
|
{
|
||||||
if( Cmd_Argc() != 2 )
|
|
||||||
{
|
|
||||||
Con_Printf( S_USAGE "timedemo <demoname>\n" );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
CL_PlayDemo_f ();
|
CL_PlayDemo_f ();
|
||||||
|
|
||||||
// cls.td_starttime will be grabbed at the second frame of the demo, so
|
// cls.td_starttime will be grabbed at the second frame of the demo, so
|
||||||
@@ -1569,7 +1646,7 @@ void CL_StartDemos_f( void )
|
|||||||
c = Cmd_Argc() - 1;
|
c = Cmd_Argc() - 1;
|
||||||
if( c > MAX_DEMOS )
|
if( c > MAX_DEMOS )
|
||||||
{
|
{
|
||||||
Con_DPrintf( S_WARN "Host_StartDemos: max %i demos in demoloop\n", MAX_DEMOS );
|
Con_DPrintf( S_WARN "%s: max %i demos in demoloop\n", __func__, MAX_DEMOS );
|
||||||
c = MAX_DEMOS;
|
c = MAX_DEMOS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1627,3 +1704,78 @@ void CL_Stop_f( void )
|
|||||||
S_StopBackgroundTrack();
|
S_StopBackgroundTrack();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CL_ListDemo_f( void )
|
||||||
|
{
|
||||||
|
demoheader_t hdr;
|
||||||
|
int32_t num_entries;
|
||||||
|
file_t *f;
|
||||||
|
char filename[MAX_QPATH];
|
||||||
|
char demoname[MAX_QPATH];
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if( Cmd_Argc() < 2 )
|
||||||
|
{
|
||||||
|
Con_Printf( S_USAGE "%s <demoname>\n", Cmd_Argv( 0 ));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_strncpy( demoname, Cmd_Argv( 1 ), sizeof( demoname ));
|
||||||
|
COM_StripExtension( demoname );
|
||||||
|
Q_snprintf( filename, sizeof( filename ), "%s.dem", demoname );
|
||||||
|
|
||||||
|
f = FS_Open( filename, "rb", true );
|
||||||
|
if( !f )
|
||||||
|
{
|
||||||
|
Con_Printf( S_ERROR "couldn't open %s\n", filename );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !CL_ParseDemoHeader( Cmd_Argv( 0 ), filename, f, &hdr, &num_entries ))
|
||||||
|
{
|
||||||
|
FS_Close( f );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Con_Printf( "Demo contents for %s:\n"
|
||||||
|
"\tProtocol: %i net/%i demo\n"
|
||||||
|
"\tFPS: %g\n"
|
||||||
|
"\tMap: %s\n"
|
||||||
|
"\tComment: %s\n"
|
||||||
|
"\tGame: %s\n",
|
||||||
|
filename, hdr.net_protocol, hdr.dem_protocol, hdr.host_fps, hdr.mapname,
|
||||||
|
hdr.comment, hdr.gamedir );
|
||||||
|
|
||||||
|
for( i = 0; i < num_entries; i++ )
|
||||||
|
{
|
||||||
|
demoentry_t entry;
|
||||||
|
|
||||||
|
Con_Printf( "Demo entry #%i:\n", i );
|
||||||
|
|
||||||
|
if( FS_Read( f, &entry, sizeof( entry )) != sizeof( entry ))
|
||||||
|
{
|
||||||
|
Con_Printf( S_ERROR "can't read demo entry\n" );
|
||||||
|
FS_Close( f );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
entry.description[sizeof( entry.description ) - 1] = 0;
|
||||||
|
|
||||||
|
if( entry.entrytype == DEMO_STARTUP )
|
||||||
|
{
|
||||||
|
// startup entries don't have anything useful
|
||||||
|
Con_Printf( "\tEntry type: " S_YELLOW "startup" S_DEFAULT "\n" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Con_Printf( "\tEntry type: " S_GREEN "normal" S_DEFAULT " (%i)\n"
|
||||||
|
"\tEntry playback time/frames: %.2f seconds/%i frames\n"
|
||||||
|
"\tEntry flags: 0x%x\n"
|
||||||
|
"\tEntry description: %s\n",
|
||||||
|
entry.entrytype, entry.playback_time, entry.playback_frames,
|
||||||
|
entry.flags, entry.description );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FS_Close( f );
|
||||||
|
}
|
||||||
|
|||||||
@@ -28,49 +28,50 @@ GNU General Public License for more details.
|
|||||||
===============================================================================
|
===============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define NUM_EFRAGS_ALLOC 64 // alloc 64 efrags (1-2kb each alloc)
|
||||||
|
|
||||||
static efrag_t **lastlink;
|
static efrag_t **lastlink;
|
||||||
static mnode_t *r_pefragtopnode;
|
static mnode_t *r_pefragtopnode;
|
||||||
static vec3_t r_emins, r_emaxs;
|
static vec3_t r_emins, r_emaxs;
|
||||||
static cl_entity_t *r_addent;
|
static cl_entity_t *r_addent;
|
||||||
|
static int cl_efrags_num;
|
||||||
|
static efrag_t *cl_efrags;
|
||||||
|
|
||||||
|
static efrag_t *CL_AllocEfrags( int num )
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
efrag_t *efrags;
|
||||||
|
|
||||||
|
if( !cl.worldmodel )
|
||||||
|
{
|
||||||
|
Host_Error( "%s: called with NULL world\n", __func__ );
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( num == 0 )
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
// set world to be the owner, so it will get automatically cleaned up
|
||||||
|
efrags = Mem_Calloc( cl.worldmodel->mempool, sizeof( *efrags ) * num );
|
||||||
|
|
||||||
|
// initialize linked list
|
||||||
|
for( i = 0; i < num - 1; i++ )
|
||||||
|
efrags[i].entnext = &efrags[i + 1];
|
||||||
|
|
||||||
|
cl_efrags_num += num;
|
||||||
|
|
||||||
|
return efrags;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
==============
|
||||||
R_RemoveEfrags
|
CL_ClearEfrags
|
||||||
|
==============
|
||||||
Call when removing an object from the world or moving it to another position
|
|
||||||
================
|
|
||||||
*/
|
*/
|
||||||
void R_RemoveEfrags( cl_entity_t *ent )
|
void CL_ClearEfrags( void )
|
||||||
{
|
{
|
||||||
efrag_t *ef, *old, *walk, **prev;
|
cl_efrags_num = 0;
|
||||||
|
cl_efrags = NULL;
|
||||||
ef = ent->efrag;
|
|
||||||
|
|
||||||
while( ef )
|
|
||||||
{
|
|
||||||
prev = &ef->leaf->efrags;
|
|
||||||
while( 1 )
|
|
||||||
{
|
|
||||||
walk = *prev;
|
|
||||||
if( !walk ) break;
|
|
||||||
|
|
||||||
if( walk == ef )
|
|
||||||
{
|
|
||||||
// remove this fragment
|
|
||||||
*prev = ef->leafnext;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else prev = &walk->leafnext;
|
|
||||||
}
|
|
||||||
|
|
||||||
old = ef;
|
|
||||||
ef = ef->entnext;
|
|
||||||
|
|
||||||
// put it on the free list
|
|
||||||
old->entnext = clgame.free_efrags;
|
|
||||||
clgame.free_efrags = old;
|
|
||||||
}
|
|
||||||
ent->efrag = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -96,14 +97,11 @@ static void R_SplitEntityOnNode( mnode_t *node )
|
|||||||
leaf = (mleaf_t *)node;
|
leaf = (mleaf_t *)node;
|
||||||
|
|
||||||
// grab an efrag off the free list
|
// grab an efrag off the free list
|
||||||
ef = clgame.free_efrags;
|
ef = cl_efrags;
|
||||||
if( !ef )
|
if( !ef )
|
||||||
{
|
ef = CL_AllocEfrags( NUM_EFRAGS_ALLOC );
|
||||||
Con_Printf( S_ERROR "too many efrags!\n" );
|
|
||||||
return; // no free fragments...
|
|
||||||
}
|
|
||||||
|
|
||||||
clgame.free_efrags = ef->entnext;
|
cl_efrags = ef->entnext;
|
||||||
ef->entity = r_addent;
|
ef->entity = r_addent;
|
||||||
|
|
||||||
// add the entity link
|
// add the entity link
|
||||||
@@ -173,35 +171,29 @@ R_StoreEfrags
|
|||||||
*/
|
*/
|
||||||
void R_StoreEfrags( efrag_t **ppefrag, int framecount )
|
void R_StoreEfrags( efrag_t **ppefrag, int framecount )
|
||||||
{
|
{
|
||||||
cl_entity_t *pent;
|
efrag_t *pefrag;
|
||||||
model_t *clmodel;
|
cl_entity_t *pent;
|
||||||
efrag_t *pefrag;
|
model_t *clmodel;
|
||||||
|
|
||||||
while(( pefrag = *ppefrag ) != NULL )
|
while(( pefrag = *ppefrag ) != NULL )
|
||||||
{
|
{
|
||||||
pent = pefrag->entity;
|
pent = pefrag->entity;
|
||||||
clmodel = pent->model;
|
clmodel = pent->model;
|
||||||
|
|
||||||
switch( clmodel->type )
|
// how this could happen?
|
||||||
{
|
if( unlikely( clmodel->type < mod_brush || clmodel->type > mod_studio ))
|
||||||
case mod_alias:
|
continue;
|
||||||
case mod_brush:
|
|
||||||
case mod_studio:
|
|
||||||
case mod_sprite:
|
|
||||||
if( pent->visframe != framecount )
|
|
||||||
{
|
|
||||||
if( CL_AddVisibleEntity( pent, ET_FRAGMENTED ))
|
|
||||||
{
|
|
||||||
// mark that we've recorded this entity for this frame
|
|
||||||
pent->curstate.messagenum = cl.parsecount;
|
|
||||||
pent->visframe = framecount;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ppefrag = &pefrag->leafnext;
|
if( pent->visframe != framecount )
|
||||||
break;
|
{
|
||||||
default:
|
if( CL_AddVisibleEntity( pent, ET_FRAGMENTED ))
|
||||||
break;
|
{
|
||||||
|
// mark that we've recorded this entity for this frame
|
||||||
|
pent->curstate.messagenum = cl.parsecount;
|
||||||
|
pent->visframe = framecount;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ppefrag = &pefrag->leafnext;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#include "r_efx.h"
|
#include "r_efx.h"
|
||||||
#include "cl_tent.h"
|
#include "cl_tent.h"
|
||||||
#include "pm_local.h"
|
#include "pm_local.h"
|
||||||
#define PART_SIZE Q_max( 0.5f, cl_draw_particles->value )
|
#define PART_SIZE Q_max( 0.5f, cl_draw_particles.value )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==============================================================
|
==============================================================
|
||||||
@@ -21,17 +21,20 @@ static int ramp2[8] = { 0x6f, 0x6e, 0x6d, 0x6c, 0x6b, 0x6a, 0x68, 0x66 };
|
|||||||
static int ramp3[6] = { 0x6d, 0x6b, 6, 5, 4, 3 };
|
static int ramp3[6] = { 0x6d, 0x6b, 6, 5, 4, 3 };
|
||||||
static int gSparkRamp[9] = { 0xfe, 0xfd, 0xfc, 0x6f, 0x6e, 0x6d, 0x6c, 0x67, 0x60 };
|
static int gSparkRamp[9] = { 0xfe, 0xfd, 0xfc, 0x6f, 0x6e, 0x6d, 0x6c, 0x67, 0x60 };
|
||||||
|
|
||||||
convar_t *tracerspeed;
|
static CVAR_DEFINE_AUTO( tracerspeed, "6000", 0, "tracer speed" );
|
||||||
convar_t *tracerlength;
|
static CVAR_DEFINE_AUTO( tracerlength, "0.8", 0, "tracer length factor" );
|
||||||
convar_t *traceroffset;
|
static CVAR_DEFINE_AUTO( traceroffset, "30", 0, "tracer starting offset" );
|
||||||
|
|
||||||
particle_t *cl_active_particles;
|
static particle_t *cl_active_particles;
|
||||||
particle_t *cl_active_tracers;
|
static particle_t *cl_active_tracers;
|
||||||
particle_t *cl_free_particles;
|
static particle_t *cl_free_particles;
|
||||||
particle_t *cl_particles = NULL; // particle pool
|
static particle_t *cl_particles = NULL; // particle pool
|
||||||
static vec3_t cl_avelocities[NUMVERTEXNORMALS];
|
static vec3_t cl_avelocities[NUMVERTEXNORMALS];
|
||||||
static float cl_lasttimewarn = 0.0f;
|
static float cl_lasttimewarn = 0.0f;
|
||||||
|
|
||||||
|
// expand debugging BBOX particle hulls by this many units.
|
||||||
|
#define BOX_GAP 0.0f
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
R_LookupColor
|
R_LookupColor
|
||||||
@@ -100,9 +103,9 @@ void CL_InitParticles( void )
|
|||||||
cl_avelocities[i][2] = COM_RandomFloat( 0.0f, 2.55f );
|
cl_avelocities[i][2] = COM_RandomFloat( 0.0f, 2.55f );
|
||||||
}
|
}
|
||||||
|
|
||||||
tracerspeed = Cvar_Get( "tracerspeed", "6000", 0, "tracer speed" );
|
Cvar_RegisterVariable( &tracerspeed );
|
||||||
tracerlength = Cvar_Get( "tracerlength", "0.8", 0, "tracer length factor" );
|
Cvar_RegisterVariable( &tracerlength );
|
||||||
traceroffset = Cvar_Get( "traceroffset", "30", 0, "tracer starting offset" );
|
Cvar_RegisterVariable( &traceroffset );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -140,26 +143,6 @@ void CL_FreeParticles( void )
|
|||||||
cl_particles = NULL;
|
cl_particles = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
================
|
|
||||||
CL_FreeParticle
|
|
||||||
|
|
||||||
move particle to freelist
|
|
||||||
================
|
|
||||||
*/
|
|
||||||
void CL_FreeParticle( particle_t *p )
|
|
||||||
{
|
|
||||||
if( p->deathfunc )
|
|
||||||
{
|
|
||||||
// call right the deathfunc before die
|
|
||||||
p->deathfunc( p );
|
|
||||||
p->deathfunc = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
p->next = cl_free_particles;
|
|
||||||
cl_free_particles = p;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
CL_AllocParticleFast
|
CL_AllocParticleFast
|
||||||
@@ -191,11 +174,11 @@ particle_t * GAME_EXPORT R_AllocParticle( void (*callback)( particle_t*, float )
|
|||||||
{
|
{
|
||||||
particle_t *p;
|
particle_t *p;
|
||||||
|
|
||||||
if( !cl_draw_particles->value )
|
if( !cl_draw_particles.value )
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
// never alloc particles when we not in game
|
// never alloc particles when we not in game
|
||||||
// if( tr.frametime == 0.0 ) return NULL;
|
if( cl_clientframetime() == 0.0 ) return NULL;
|
||||||
|
|
||||||
if( !cl_free_particles )
|
if( !cl_free_particles )
|
||||||
{
|
{
|
||||||
@@ -238,15 +221,15 @@ R_AllocTracer
|
|||||||
can return NULL if particles is out
|
can return NULL if particles is out
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
particle_t *R_AllocTracer( const vec3_t org, const vec3_t vel, float life )
|
static particle_t *R_AllocTracer( const vec3_t org, const vec3_t vel, float life )
|
||||||
{
|
{
|
||||||
particle_t *p;
|
particle_t *p;
|
||||||
|
|
||||||
if( !cl_draw_tracers->value )
|
if( !cl_draw_tracers.value )
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
// never alloc particles when we not in game
|
// never alloc particles when we not in game
|
||||||
//if( tr.frametime == 0.0 ) return NULL;
|
if( cl_clientframetime() == 0.0 ) return NULL;
|
||||||
|
|
||||||
if( !cl_free_particles )
|
if( !cl_free_particles )
|
||||||
{
|
{
|
||||||
@@ -269,8 +252,8 @@ particle_t *R_AllocTracer( const vec3_t org, const vec3_t vel, float life )
|
|||||||
VectorCopy( org, p->org );
|
VectorCopy( org, p->org );
|
||||||
VectorCopy( vel, p->vel );
|
VectorCopy( vel, p->vel );
|
||||||
p->die = cl.time + life;
|
p->die = cl.time + life;
|
||||||
p->ramp = tracerlength->value;
|
p->ramp = tracerlength.value;
|
||||||
p->color = 4; // select custom color
|
p->color = TRACER_COLORINDEX_DEFAULT; // select custom color
|
||||||
p->packedColor = 255; // alpha
|
p->packedColor = 255; // alpha
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
@@ -282,9 +265,9 @@ VIEWBEAMS MANAGEMENT
|
|||||||
|
|
||||||
==============================================================
|
==============================================================
|
||||||
*/
|
*/
|
||||||
BEAM *cl_active_beams;
|
static BEAM *cl_active_beams;
|
||||||
BEAM *cl_free_beams;
|
static BEAM *cl_free_beams;
|
||||||
BEAM *cl_viewbeams = NULL; // beams pool
|
static BEAM *cl_viewbeams = NULL; // beams pool
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -320,7 +303,7 @@ R_BeamAlloc
|
|||||||
|
|
||||||
==============
|
==============
|
||||||
*/
|
*/
|
||||||
BEAM *R_BeamAlloc( void )
|
static BEAM *R_BeamAlloc( void )
|
||||||
{
|
{
|
||||||
BEAM *pBeam;
|
BEAM *pBeam;
|
||||||
|
|
||||||
@@ -343,7 +326,7 @@ R_BeamFree
|
|||||||
|
|
||||||
==============
|
==============
|
||||||
*/
|
*/
|
||||||
void R_BeamFree( BEAM *pBeam )
|
static void R_BeamFree( BEAM *pBeam )
|
||||||
{
|
{
|
||||||
// free particles that have died off.
|
// free particles that have died off.
|
||||||
R_FreeDeadParticles( &pBeam->particles );
|
R_FreeDeadParticles( &pBeam->particles );
|
||||||
@@ -625,7 +608,7 @@ CL_BeamAttemptToDie
|
|||||||
Check for expired beams
|
Check for expired beams
|
||||||
==============
|
==============
|
||||||
*/
|
*/
|
||||||
qboolean CL_BeamAttemptToDie( BEAM *pBeam )
|
static qboolean CL_BeamAttemptToDie( BEAM *pBeam )
|
||||||
{
|
{
|
||||||
Assert( pBeam != NULL );
|
Assert( pBeam != NULL );
|
||||||
|
|
||||||
@@ -656,12 +639,24 @@ and all particle trails (if this is a beamfollow)
|
|||||||
*/
|
*/
|
||||||
void GAME_EXPORT R_BeamKill( int deadEntity )
|
void GAME_EXPORT R_BeamKill( int deadEntity )
|
||||||
{
|
{
|
||||||
cl_entity_t *pDeadEntity;
|
BEAM *beam;
|
||||||
|
|
||||||
pDeadEntity = R_BeamGetEntity( deadEntity );
|
for( beam = cl_active_beams; beam; beam = beam->next )
|
||||||
if( !pDeadEntity ) return;
|
{
|
||||||
|
if( FBitSet( beam->flags, FBEAM_STARTENTITY ) && beam->startEntity == deadEntity )
|
||||||
|
{
|
||||||
|
if( beam->type != TE_BEAMFOLLOW )
|
||||||
|
beam->die = cl.time;
|
||||||
|
|
||||||
CL_KillDeadBeams( pDeadEntity );
|
ClearBits( beam->flags, FBEAM_STARTENTITY );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( FBitSet( beam->flags, FBEAM_ENDENTITY ) && beam->endEntity == deadEntity )
|
||||||
|
{
|
||||||
|
beam->die = cl.time;
|
||||||
|
ClearBits( beam->flags, FBEAM_ENDENTITY );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1114,9 +1109,7 @@ void GAME_EXPORT R_ParticleExplosion2( const vec3_t org, int colorStart, int col
|
|||||||
int colorMod = 0, packedColor;
|
int colorMod = 0, packedColor;
|
||||||
particle_t *p;
|
particle_t *p;
|
||||||
|
|
||||||
if( FBitSet( host.features, ENGINE_QUAKE_COMPATIBLE ))
|
packedColor = Host_IsQuakeCompatible( ) ? 255 : 0; // use old code for blob particles
|
||||||
packedColor = 255; // use old code for blob particles
|
|
||||||
else packedColor = 0;
|
|
||||||
|
|
||||||
for( i = 0; i < 512; i++ )
|
for( i = 0; i < 512; i++ )
|
||||||
{
|
{
|
||||||
@@ -1149,9 +1142,7 @@ void GAME_EXPORT R_BlobExplosion( const vec3_t org )
|
|||||||
particle_t *p;
|
particle_t *p;
|
||||||
int i, j, packedColor;
|
int i, j, packedColor;
|
||||||
|
|
||||||
if( FBitSet( host.features, ENGINE_QUAKE_COMPATIBLE ))
|
packedColor = Host_IsQuakeCompatible( ) ? 255 : 0; // use old code for blob particles
|
||||||
packedColor = 255; // use old code for blob particles
|
|
||||||
else packedColor = 0;
|
|
||||||
|
|
||||||
for( i = 0; i < 1024; i++ )
|
for( i = 0; i < 1024; i++ )
|
||||||
{
|
{
|
||||||
@@ -1256,12 +1247,15 @@ R_BloodStream
|
|||||||
particle spray 2
|
particle spray 2
|
||||||
===============
|
===============
|
||||||
*/
|
*/
|
||||||
void GAME_EXPORT R_BloodStream( const vec3_t org, const vec3_t dir, int pcolor, int speed )
|
void GAME_EXPORT R_BloodStream( const vec3_t org, const vec3_t ndir, int pcolor, int speed )
|
||||||
{
|
{
|
||||||
particle_t *p;
|
particle_t *p;
|
||||||
int i, j;
|
int i, j;
|
||||||
float arc;
|
float arc;
|
||||||
int accel = speed; // must be integer due to bug in GoldSrc
|
int accel = speed; // must be integer due to bug in GoldSrc
|
||||||
|
vec3_t dir;
|
||||||
|
|
||||||
|
VectorNormalize2( ndir, dir );
|
||||||
|
|
||||||
for( arc = 0.05f, i = 0; i < 100; i++ )
|
for( arc = 0.05f, i = 0; i < 100; i++ )
|
||||||
{
|
{
|
||||||
@@ -1610,6 +1604,73 @@ void GAME_EXPORT R_RocketTrail( vec3_t start, vec3_t end, int type )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
===============
|
||||||
|
PM_ParticleLine
|
||||||
|
|
||||||
|
draw line from particles
|
||||||
|
================
|
||||||
|
*/
|
||||||
|
static void PM_ParticleLine( const vec3_t start, const vec3_t end, int pcolor, float life, float zvel )
|
||||||
|
{
|
||||||
|
float len, curdist;
|
||||||
|
vec3_t diff, pos;
|
||||||
|
|
||||||
|
// determine distance
|
||||||
|
VectorSubtract( end, start, diff );
|
||||||
|
len = VectorNormalizeLength( diff );
|
||||||
|
curdist = 0;
|
||||||
|
|
||||||
|
while( curdist <= len )
|
||||||
|
{
|
||||||
|
VectorMA( start, curdist, diff, pos );
|
||||||
|
CL_Particle( pos, pcolor, life, 0, zvel );
|
||||||
|
curdist += 2.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
================
|
||||||
|
PM_DrawRectangle
|
||||||
|
|
||||||
|
================
|
||||||
|
*/
|
||||||
|
static void PM_DrawRectangle( const vec3_t tl, const vec3_t bl, const vec3_t tr, const vec3_t br, int pcolor, float life )
|
||||||
|
{
|
||||||
|
PM_ParticleLine( tl, bl, pcolor, life, 0 );
|
||||||
|
PM_ParticleLine( bl, br, pcolor, life, 0 );
|
||||||
|
PM_ParticleLine( br, tr, pcolor, life, 0 );
|
||||||
|
PM_ParticleLine( tr, tl, pcolor, life, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
================
|
||||||
|
PM_DrawBBox
|
||||||
|
|
||||||
|
================
|
||||||
|
*/
|
||||||
|
static void PM_DrawBBox( const vec3_t mins, const vec3_t maxs, const vec3_t origin, int pcolor, float life )
|
||||||
|
{
|
||||||
|
vec3_t p[8], tmp;
|
||||||
|
float gap = BOX_GAP;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for( i = 0; i < 8; i++ )
|
||||||
|
{
|
||||||
|
tmp[0] = (i & 1) ? mins[0] - gap : maxs[0] + gap;
|
||||||
|
tmp[1] = (i & 2) ? mins[1] - gap : maxs[1] + gap ;
|
||||||
|
tmp[2] = (i & 4) ? mins[2] - gap : maxs[2] + gap ;
|
||||||
|
|
||||||
|
VectorAdd( tmp, origin, tmp );
|
||||||
|
VectorCopy( tmp, p[i] );
|
||||||
|
}
|
||||||
|
|
||||||
|
for( i = 0; i < 6; i++ )
|
||||||
|
{
|
||||||
|
PM_DrawRectangle( p[boxpnt[i][1]], p[boxpnt[i][0]], p[boxpnt[i][2]], p[boxpnt[i][3]], pcolor, life );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
R_ParticleLine
|
R_ParticleLine
|
||||||
@@ -1773,25 +1834,6 @@ void GAME_EXPORT R_StreakSplash( const vec3_t pos, const vec3_t dir, int color,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
===============
|
|
||||||
R_DebugParticle
|
|
||||||
|
|
||||||
just for debug purposes
|
|
||||||
===============
|
|
||||||
*/
|
|
||||||
void R_DebugParticle( const vec3_t pos, byte r, byte g, byte b )
|
|
||||||
{
|
|
||||||
particle_t *p;
|
|
||||||
|
|
||||||
p = R_AllocParticle( NULL );
|
|
||||||
if( !p ) return;
|
|
||||||
|
|
||||||
VectorCopy( pos, p->org );
|
|
||||||
p->color = R_LookupColor( r, g, b );
|
|
||||||
p->die = cl.time + 0.01f;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===============
|
===============
|
||||||
CL_Particle
|
CL_Particle
|
||||||
@@ -1824,14 +1866,14 @@ void GAME_EXPORT R_TracerEffect( const vec3_t start, const vec3_t end )
|
|||||||
float len, speed;
|
float len, speed;
|
||||||
float offset;
|
float offset;
|
||||||
|
|
||||||
speed = Q_max( tracerspeed->value, 3.0f );
|
speed = Q_max( tracerspeed.value, 3.0f );
|
||||||
|
|
||||||
VectorSubtract( end, start, dir );
|
VectorSubtract( end, start, dir );
|
||||||
len = VectorLength( dir );
|
len = VectorLength( dir );
|
||||||
if( len == 0.0f ) return;
|
if( len == 0.0f ) return;
|
||||||
|
|
||||||
VectorScale( dir, 1.0f / len, dir ); // normalize
|
VectorScale( dir, 1.0f / len, dir ); // normalize
|
||||||
offset = COM_RandomFloat( -10.0f, 9.0f ) + traceroffset->value;
|
offset = COM_RandomFloat( -10.0f, 9.0f ) + traceroffset.value;
|
||||||
VectorScale( dir, offset, vel );
|
VectorScale( dir, offset, vel );
|
||||||
VectorAdd( start, vel, pos );
|
VectorAdd( start, vel, pos );
|
||||||
VectorScale( dir, speed, vel );
|
VectorScale( dir, speed, vel );
|
||||||
@@ -2057,7 +2099,7 @@ void CL_ReadPointFile_f( void )
|
|||||||
else Con_Printf( "map %s has no leaks!\n", clgame.mapname );
|
else Con_Printf( "map %s has no leaks!\n", clgame.mapname );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CL_FreeDeadBeams( void )
|
static void CL_FreeDeadBeams( void )
|
||||||
{
|
{
|
||||||
BEAM *pBeam, *pNext, *pPrev = NULL;
|
BEAM *pBeam, *pNext, *pPrev = NULL;
|
||||||
// draw temporary entity beams
|
// draw temporary entity beams
|
||||||
@@ -2087,16 +2129,16 @@ void CL_FreeDeadBeams( void )
|
|||||||
void CL_DrawEFX( float time, qboolean fTrans )
|
void CL_DrawEFX( float time, qboolean fTrans )
|
||||||
{
|
{
|
||||||
CL_FreeDeadBeams();
|
CL_FreeDeadBeams();
|
||||||
if( CVAR_TO_BOOL( cl_draw_beams ))
|
if( cl_draw_beams.value )
|
||||||
ref.dllFuncs.CL_DrawBeams( fTrans, cl_active_beams );
|
ref.dllFuncs.CL_DrawBeams( fTrans, cl_active_beams );
|
||||||
|
|
||||||
if( fTrans )
|
if( fTrans )
|
||||||
{
|
{
|
||||||
R_FreeDeadParticles( &cl_active_particles );
|
R_FreeDeadParticles( &cl_active_particles );
|
||||||
if( CVAR_TO_BOOL( cl_draw_particles ))
|
if( cl_draw_particles.value )
|
||||||
ref.dllFuncs.CL_DrawParticles( time, cl_active_particles, PART_SIZE );
|
ref.dllFuncs.CL_DrawParticles( time, cl_active_particles, PART_SIZE );
|
||||||
R_FreeDeadParticles( &cl_active_tracers );
|
R_FreeDeadParticles( &cl_active_tracers );
|
||||||
if( CVAR_TO_BOOL( cl_draw_tracers ))
|
if( cl_draw_tracers.value )
|
||||||
ref.dllFuncs.CL_DrawTracers( time, cl_active_tracers );
|
ref.dllFuncs.CL_DrawTracers( time, cl_active_tracers );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user