mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-06 12:25:00 +08:00
Compare commits
3390 Commits
original
...
continuous
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | ||
|
|
7ed0499aa9 | ||
|
|
401b145040 | ||
|
|
3853ff5435 | ||
|
|
744c6b2680 | ||
|
|
030a17fc58 | ||
|
|
b1e2e84a11 | ||
|
|
12a6088912 | ||
|
|
fe9f3f78a0 | ||
|
|
327eb330ed | ||
|
|
470121512a | ||
|
|
dedc144b8b | ||
|
|
6d37398fad | ||
|
|
3c8fe508f0 | ||
|
|
8ffb3aac8a | ||
|
|
0ed9391969 | ||
|
|
e54289f811 | ||
|
|
17b091e5a9 | ||
|
|
61c142e2db | ||
|
|
7e664679a0 | ||
|
|
fd152e82e8 | ||
|
|
0c50e43663 | ||
|
|
7a2ac4a9c0 | ||
|
|
e6bb9d980d | ||
|
|
45cc7e5bcc | ||
|
|
4be4870982 | ||
|
|
19c2061831 | ||
|
|
3a8c58d192 | ||
|
|
24763f9b07 | ||
|
|
0d7a2e7bad | ||
|
|
82ab06efdd | ||
|
|
4110ee0928 | ||
|
|
4b05cf4399 | ||
|
|
f29a9f5f58 | ||
|
|
28001ea150 | ||
|
|
f633b3dbf6 | ||
|
|
bebfa611fc | ||
|
|
3e9f2df2bf | ||
|
|
fce8afabfb | ||
|
|
9d49985100 | ||
|
|
a7d4cafe10 | ||
|
|
ca2a6635b6 | ||
|
|
7f1bb9b4a6 | ||
|
|
7341a6b020 | ||
|
|
ac05acf6dc | ||
|
|
3e1db432df | ||
|
|
3c682507e7 | ||
|
|
e9ae6d08b5 | ||
|
|
f435a81c97 | ||
|
|
cb34c23844 | ||
|
|
9f9141823a | ||
|
|
d3437c70bd | ||
|
|
8630ef2c67 | ||
|
|
0b50678912 | ||
|
|
22ff45f5d0 | ||
|
|
905bbf1515 | ||
|
|
88c1b1400d | ||
|
|
8e48a98d48 | ||
|
|
76dbefb9ec | ||
|
|
327dcc0293 | ||
|
|
e6c55107c7 | ||
|
|
c5dbbea9ef | ||
|
|
74707551ae | ||
|
|
2f5f5ef0a6 | ||
|
|
f7dc9d8e72 | ||
|
|
238162bb79 | ||
|
|
1fda8753bd | ||
|
|
a688bed79f | ||
|
|
b0ff51d5a0 | ||
|
|
68f633e9cd | ||
|
|
a520af42e8 | ||
|
|
0a6885e02d | ||
|
|
aa5a509316 | ||
|
|
97879430e9 | ||
|
|
ae97eae42f | ||
|
|
c5d7e3c783 | ||
|
|
9bcd36cc24 | ||
|
|
c6881a425f | ||
|
|
8d0209b122 | ||
|
|
279894cfd4 | ||
|
|
169ee14724 | ||
|
|
8866d5cfd6 | ||
|
|
3b9a7910d0 | ||
|
|
b5885d4107 | ||
|
|
a254a342b1 | ||
|
|
0db95d76a8 | ||
|
|
69a9211fc9 | ||
|
|
44cd03f464 | ||
|
|
9242a0a510 | ||
|
|
2b9e050f57 | ||
|
|
9d4fe707bb | ||
|
|
0d2552c3f6 | ||
|
|
b3c9637422 | ||
|
|
01a3321d63 | ||
|
|
5a5e72c424 | ||
|
|
b8dc7494eb | ||
|
|
532cd779a7 | ||
|
|
d202a6c572 | ||
|
|
6e864e4f8f | ||
|
|
6ef76fe665 | ||
|
|
314672d82c | ||
|
|
1d558b33d6 | ||
|
|
911385d019 | ||
|
|
5b97c2135a | ||
|
|
365f24e1fe | ||
|
|
7157c3b441 | ||
|
|
28d7f2eaa2 | ||
|
|
0d449370e0 | ||
|
|
10ad1c3b38 | ||
|
|
90c566dde3 | ||
|
|
33cbead4a4 | ||
|
|
d6dfeaeba7 | ||
|
|
bc00c6c54b | ||
|
|
3d5aa7c20c | ||
|
|
a5ba43ea39 | ||
|
|
3eb4862794 | ||
|
|
c025606739 | ||
|
|
067e9be37a | ||
|
|
b7b9c611cf | ||
|
|
3c4eec62ae | ||
|
|
fd7dba74cd | ||
|
|
a8674c18df | ||
|
|
b26cd6cc94 | ||
|
|
55a29e6e6b | ||
|
|
56d7c05b51 | ||
|
|
5e4fc64430 | ||
|
|
12ea6dcfd7 | ||
|
|
a41f8cb01b | ||
|
|
a9c82dbe21 | ||
|
|
5350d88f57 | ||
|
|
fc132e87f4 | ||
|
|
c326853617 | ||
|
|
3ad60a0fa1 | ||
|
|
772f4dcb60 | ||
|
|
657a6af9dc | ||
|
|
5e1f189db3 | ||
|
|
a2d11f670a | ||
|
|
5bf6f814ef | ||
|
|
fc84cd2a0a | ||
|
|
ab43486ee0 | ||
|
|
d8724f0be4 | ||
|
|
fce3959d15 | ||
|
|
36b0d47f5f | ||
|
|
cf84ad12f1 | ||
|
|
ffe7114a47 | ||
|
|
6891ed8064 | ||
|
|
8f91830997 | ||
|
|
fbdfed84be | ||
|
|
786c408f6e | ||
|
|
6e031b518a | ||
|
|
500dd0a82b | ||
|
|
d562642e26 | ||
|
|
cbcb90638b | ||
|
|
8211acf4e0 | ||
|
|
c4a25e0d70 | ||
|
|
3ec9977212 | ||
|
|
64eb0a694d | ||
|
|
d46d62bf03 | ||
|
|
95ed044fee | ||
|
|
3fe392b41f | ||
|
|
854bfb8673 | ||
|
|
fb43a5590f | ||
|
|
5d4f8373c4 | ||
|
|
ac9664c7ae | ||
|
|
2905f951bd | ||
|
|
79dc090aae | ||
|
|
d52b07beac | ||
|
|
12815bfbf2 | ||
|
|
b9b8b0521b | ||
|
|
af8febabd1 | ||
|
|
f0a856d9c8 | ||
|
|
85895c5311 | ||
|
|
c076f4ff8e | ||
|
|
87ce35b32d | ||
|
|
5285f51a26 | ||
|
|
3e23634369 | ||
|
|
36cec298c2 | ||
|
|
6199426e5e | ||
|
|
4e295622be | ||
|
|
2182ba9630 | ||
|
|
e5720cf8b9 | ||
|
|
6063ca2ad1 | ||
|
|
99de598ea4 | ||
|
|
b23d5ed354 | ||
|
|
a1ce5faac2 | ||
|
|
afaabe26a6 | ||
|
|
a68afcc672 | ||
|
|
d4bb5423ae | ||
|
|
ce8e5880e2 | ||
|
|
0cef18af86 | ||
|
|
ad4d0cf00a | ||
|
|
a6f12d3009 | ||
|
|
fa09854671 | ||
|
|
78d2cd848a | ||
|
|
463997da51 | ||
|
|
fef0993f54 | ||
|
|
2218126c75 | ||
|
|
2388260848 | ||
|
|
40298cefb6 | ||
|
|
45bf927c74 | ||
|
|
347c6d6a91 | ||
|
|
ab6214142f | ||
|
|
402b38951d | ||
|
|
6807cf5849 | ||
|
|
15dc25d2cd | ||
|
|
568c7fd917 | ||
|
|
e5562a7b61 | ||
|
|
ac308f7298 | ||
|
|
7a88379917 | ||
|
|
e44718d531 | ||
|
|
e6a2c207de | ||
|
|
df83b155a1 | ||
|
|
cc2c97cfad | ||
|
|
c69ea00e79 | ||
|
|
f63dd72260 | ||
|
|
5b0b917468 | ||
|
|
b138a63502 | ||
|
|
8eec5389fe | ||
|
|
5524aaae1e | ||
|
|
acffeb1dad | ||
|
|
6c7d57e1eb | ||
|
|
7c9f5f8ab1 | ||
|
|
6b4f55c4bf | ||
|
|
89335938c1 | ||
|
|
437630d26d | ||
|
|
341c9dae39 | ||
|
|
c10b70cb61 | ||
|
|
4c7bf1ff44 | ||
|
|
f467d0c807 | ||
|
|
a717b7fc49 | ||
|
|
07a9c4602d | ||
|
|
eeb170af22 | ||
|
|
c532c3032c | ||
|
|
2b8b3e1993 | ||
|
|
b0a889d1a1 | ||
|
|
bd1bfea695 | ||
|
|
a1299e1dfe | ||
|
|
1a5a76a201 | ||
|
|
b072b627a2 | ||
|
|
5d18c6d678 | ||
|
|
59fba30a52 | ||
|
|
193cde83b6 | ||
|
|
12bfb8f795 | ||
|
|
9ae72dbc47 | ||
|
|
ae6ad74994 | ||
|
|
f417433f59 | ||
|
|
080dc38f11 | ||
|
|
13f93412cd | ||
|
|
ca975d0168 | ||
|
|
b82d0bad7a | ||
|
|
d1de9e2802 | ||
|
|
efdf9e3599 | ||
|
|
060835cf2f | ||
|
|
74485f30d3 | ||
|
|
8dda35a128 | ||
|
|
978ec27a57 | ||
|
|
113f18cfb0 | ||
|
|
6f36edfd16 | ||
|
|
5fb4edeb36 | ||
|
|
dd29e705f8 | ||
|
|
8445567ab4 | ||
|
|
11d4cb0f1e | ||
|
|
db48d0ded7 | ||
|
|
86a777880f | ||
|
|
0d195ee6fe | ||
|
|
5e4996b119 | ||
|
|
f25254369d | ||
|
|
9ce8edcb38 | ||
|
|
33d79ddb24 | ||
|
|
52d1383f14 | ||
|
|
843c9abf9b | ||
|
|
924e895753 | ||
|
|
ac40badaa5 | ||
|
|
fd83b0dc17 | ||
|
|
5715023a0d | ||
|
|
51526948c0 | ||
|
|
10ec32e264 | ||
|
|
4fbd96d201 | ||
|
|
81b01ac561 | ||
|
|
771c359ed0 | ||
|
|
d1a5c33bf1 | ||
|
|
641f0632ef | ||
|
|
974f0787a4 | ||
|
|
87ceb0f9cb | ||
|
|
cfcd58dd78 | ||
|
|
8044d23e7f | ||
|
|
b175d6d95f | ||
|
|
d3e213aa1b | ||
|
|
26e09c240a | ||
|
|
15eb6808c4 | ||
|
|
5402e1a259 | ||
|
|
74086cc4c1 | ||
|
|
9c85d114e7 | ||
|
|
81c4acab66 | ||
|
|
6f2fda427e | ||
|
|
09b7f22cee | ||
|
|
691a305f8e | ||
|
|
66dc20dc2d | ||
|
|
92cfa2af48 | ||
|
|
9515cccb94 | ||
|
|
a7d02b8268 | ||
|
|
22815d2784 | ||
|
|
95ee88720c | ||
|
|
58dbc1ba31 | ||
|
|
d7431783d4 | ||
|
|
c8410f7e46 | ||
|
|
80e20cb55b | ||
|
|
654bac83a5 | ||
|
|
fc7fb8b62d | ||
|
|
65d624140e | ||
|
|
cd2720ba81 | ||
|
|
d2f3b1974e | ||
|
|
91742d613d | ||
|
|
fba323cf1f | ||
|
|
f67d0ffa5a | ||
|
|
a6fbf5fb74 | ||
|
|
df616b950d | ||
|
|
37cf4da136 | ||
|
|
668d528e3b | ||
|
|
12da44a3d7 | ||
|
|
51fcae8cec | ||
|
|
6473efa995 | ||
|
|
cf7852832f | ||
|
|
29ad3de78a | ||
|
|
8169c2a40b | ||
|
|
85f99c723a | ||
|
|
edc171be04 | ||
|
|
9047fe2e74 | ||
|
|
24ea8fba4b | ||
|
|
e07417aead | ||
|
|
13b36e66b3 | ||
|
|
7821f425e7 | ||
|
|
f0783ddee1 | ||
|
|
d4d39c66fb | ||
|
|
a2d8a47376 | ||
|
|
3f7773f83b | ||
|
|
18933e7981 | ||
|
|
9917cba8fc | ||
|
|
203afda053 | ||
|
|
6dbb694fdc | ||
|
|
0c26c24331 | ||
|
|
51635995a2 | ||
|
|
988183a96a | ||
|
|
d8fd0b3dcb | ||
|
|
a6b43fbfff | ||
|
|
61643585e0 | ||
|
|
75e8a51058 | ||
|
|
3a55b9cd67 | ||
|
|
89baa633c8 | ||
|
|
1bf08cc2c3 | ||
|
|
36d757c74a | ||
|
|
0891356ec5 | ||
|
|
0fa1b4f944 | ||
|
|
56103a90eb | ||
|
|
2fa964e939 | ||
|
|
0027678a56 | ||
|
|
ffea7d9729 | ||
|
|
0e286f31c5 | ||
|
|
b9cec43e2c | ||
|
|
bb84a3cb7f | ||
|
|
5aa6bfee85 | ||
|
|
204544f50f | ||
|
|
df4f21680c | ||
|
|
2c1b862654 | ||
|
|
ea5937bce0 | ||
|
|
6e4ab74694 | ||
|
|
2c74a633d0 | ||
|
|
22e770e4d4 | ||
|
|
1f26710bd0 | ||
|
|
96f35f76e1 | ||
|
|
fa37d153c8 | ||
|
|
aa5594d11f | ||
|
|
6b332eabd2 | ||
|
|
13cf909b99 | ||
|
|
606b5354e6 | ||
|
|
e29dcb4125 | ||
|
|
c3513b1615 | ||
|
|
abbd0f92a4 | ||
|
|
f9d0fba05f | ||
|
|
1ffe050205 | ||
|
|
a2f741fe8a | ||
|
|
d0a39ef492 | ||
|
|
f63d2d747f | ||
|
|
7e687b45bb | ||
|
|
284eeea3c3 | ||
|
|
01b2266b7e | ||
|
|
0714ab27b5 | ||
|
|
4ae608913b | ||
|
|
295adcf222 | ||
|
|
3351ecd754 | ||
|
|
ccf90beb7d | ||
|
|
7fbbe9f015 | ||
|
|
46fd27eb14 | ||
|
|
f1a4d66d27 | ||
|
|
c619bb4af7 | ||
|
|
210137c325 | ||
|
|
d4d79573f6 | ||
|
|
b7a32f6843 | ||
|
|
f1dabf13a1 | ||
|
|
947b94d29f | ||
|
|
f007374866 | ||
|
|
7cb06956c2 | ||
|
|
ebfa8e6ffc | ||
|
|
7869aac2e5 | ||
|
|
f3dfbc9219 | ||
|
|
4f89288ccf | ||
|
|
fb8791529e | ||
|
|
f0feb1dfbf | ||
|
|
2df27e14a8 | ||
|
|
764ef93984 | ||
|
|
d8b3ab4dcc | ||
|
|
08e72bad35 | ||
|
|
7e574ea42e | ||
|
|
0963e05716 | ||
|
|
23e2f4d0cc | ||
|
|
ca3544d559 | ||
|
|
7a0a355baf | ||
|
|
f7bf081650 | ||
|
|
a4be009ce7 | ||
|
|
d3248aad66 | ||
|
|
000c594596 | ||
|
|
960a8959d5 | ||
|
|
2604ea39c5 | ||
|
|
dc186c3cba | ||
|
|
f60112773f | ||
|
|
37aa5b1e99 | ||
|
|
aa07dab8ab | ||
|
|
ac213c22ed | ||
|
|
e0efe0aa23 | ||
|
|
29bc0392ee | ||
|
|
054765232e | ||
|
|
89425e4bf2 | ||
|
|
a777e7c80d | ||
|
|
1350fd0b52 | ||
|
|
d7db48ce4b | ||
|
|
293482fbd5 | ||
|
|
3771a1d6c5 | ||
|
|
07f1f7ded1 | ||
|
|
1cac321c00 | ||
|
|
aa7bfb4819 | ||
|
|
0c18a06946 | ||
|
|
24edcf7d9e | ||
|
|
ecddae8ee6 | ||
|
|
1ab49adbf2 | ||
|
|
28b49e00e5 | ||
|
|
1e6be598e9 | ||
|
|
155e15939b | ||
|
|
3f014fde73 | ||
|
|
66db69862f | ||
|
|
fc665527ae | ||
|
|
0c6b51fa0c | ||
|
|
c00e77c02e | ||
|
|
25c0557f7f | ||
|
|
76ea3c39a0 | ||
|
|
e67bd4811a | ||
|
|
7a215766c6 | ||
|
|
576f0a72c5 | ||
|
|
55b4597390 | ||
|
|
c64b3db6b8 | ||
|
|
67e77ca099 | ||
|
|
f726793711 | ||
|
|
1944f48516 | ||
|
|
992bcd89ef | ||
|
|
2356bc9905 | ||
|
|
9159d406e3 | ||
|
|
508eb7ab5f | ||
|
|
1de1852409 | ||
|
|
664506f79e | ||
|
|
06eb6838a9 | ||
|
|
f2a9f805b8 | ||
|
|
c6648a69ba | ||
|
|
3203d9a043 | ||
|
|
8599119c8d | ||
|
|
a3d6e7bcfe | ||
|
|
36702aafe7 | ||
|
|
b93938956e | ||
|
|
c96f10d40b | ||
|
|
8a9231628e | ||
|
|
66d66eb835 | ||
|
|
9a4dec64f9 | ||
|
|
94dc74a37f | ||
|
|
b24c1a51d3 | ||
|
|
c79a649d97 | ||
|
|
f9d1d14848 | ||
|
|
1a1d81de62 | ||
|
|
6c9321e50c | ||
|
|
c366e25a10 | ||
|
|
8ab97fbbf0 | ||
|
|
a5a66f6c3e | ||
|
|
1c6604806c | ||
|
|
39893609fd | ||
|
|
b9901bcb70 | ||
|
|
6571c78ed4 | ||
|
|
d1e6063650 | ||
|
|
42db1faa51 | ||
|
|
efc156fcf5 | ||
|
|
207675990e | ||
|
|
e8cd6e9d65 | ||
|
|
ab256e294e | ||
|
|
d9fd6aa05c | ||
|
|
57382c7cea | ||
|
|
1042291ad6 | ||
|
|
c9e4912a2a | ||
|
|
e5e1570aed | ||
|
|
621399c49b | ||
|
|
c3684109bf | ||
|
|
f3fedbfdba | ||
|
|
29a8bfb1dc | ||
|
|
004e190435 | ||
|
|
378c4f30f3 | ||
|
|
a8c877c841 | ||
|
|
8ce448cc77 | ||
|
|
4ba95277b9 | ||
|
|
cce7c7d782 | ||
|
|
9e5d5e0ea3 | ||
|
|
a235bec5f1 | ||
|
|
a3a8acfe6c | ||
|
|
9e4e9cab04 | ||
|
|
e4ad8def0d | ||
|
|
ec95948b69 | ||
|
|
ef6ff3cfa6 | ||
|
|
7bcfce5a7a | ||
|
|
08c04200fb | ||
|
|
8bbd0d5119 | ||
|
|
ade0fd4afa | ||
|
|
ed7ed818bb | ||
|
|
91f845c335 | ||
|
|
81ef12be9e | ||
|
|
2aafe9df9f | ||
|
|
3b933eabf5 | ||
|
|
f5ccf093d6 | ||
|
|
fe0da74e75 | ||
|
|
2939ab8ea4 | ||
|
|
dd90262db2 | ||
|
|
4f8e4b5f64 | ||
|
|
32068d8090 | ||
|
|
bd4979f5b0 | ||
|
|
a5e1e9646c | ||
|
|
013918a371 | ||
|
|
1b20694a1c | ||
|
|
2db6ad2c8a | ||
|
|
8c351d9255 | ||
|
|
c4ef42009c | ||
|
|
8d5426cdcd | ||
|
|
7b8ec0ad4b | ||
|
|
901e52615b | ||
|
|
88ce5fd0b6 | ||
|
|
588dede2a2 | ||
|
|
0efc5e82ec | ||
|
|
c3da9d8c8f | ||
|
|
a547526e86 | ||
|
|
09d647182d | ||
|
|
af3c0686c5 | ||
|
|
8b76ab93fb | ||
|
|
9ffc02b6e9 | ||
|
|
5d307d603c | ||
|
|
affc64c6da | ||
|
|
e00c20b288 | ||
|
|
dcf7ec2c3d | ||
|
|
21a31ec81d | ||
|
|
9287a0f5c5 | ||
|
|
4723eb2586 | ||
|
|
15ec6539e3 | ||
|
|
8d793521c4 | ||
|
|
2147542e33 | ||
|
|
a0af256641 | ||
|
|
21174dc9cf | ||
|
|
894726d699 | ||
|
|
f8e6033ae6 | ||
|
|
4abe1a77f4 | ||
|
|
79f3a6f60e | ||
|
|
a2c83144c0 | ||
|
|
6e0d372504 | ||
|
|
91ee9bd32a | ||
|
|
6ea25b8194 | ||
|
|
5bc4359a2f | ||
|
|
17d3eaa590 | ||
|
|
6ceb101ba1 | ||
|
|
f7f069a38b | ||
|
|
37c5dfa49f | ||
|
|
0260a6c234 | ||
|
|
2ad209b973 | ||
|
|
e9712fc24f | ||
|
|
eef52ea2d0 | ||
|
|
8018f4a000 | ||
|
|
9d0c7338ab | ||
|
|
18d8ef287d | ||
|
|
9b1fccd1fa | ||
|
|
32e96bdad1 | ||
|
|
c50f73b892 | ||
|
|
a1c948e591 | ||
|
|
db3e71bfcc | ||
|
|
2b436dced0 | ||
|
|
a89f9fa181 | ||
|
|
6063149b93 | ||
|
|
a28d15e519 | ||
|
|
94959110f6 | ||
|
|
86be161677 | ||
|
|
9313f7e80e | ||
|
|
43f1137565 | ||
|
|
ad4062969b | ||
|
|
60c10333aa | ||
|
|
0f84ce40f0 | ||
|
|
3894edcb98 | ||
|
|
5b387ba36a | ||
|
|
d011dccaab | ||
|
|
b7922368bd | ||
|
|
947a615707 | ||
|
|
b2d93b7b55 | ||
|
|
49a20a9ac5 | ||
|
|
8966172ce0 | ||
|
|
ddd48c420b | ||
|
|
f31e9ae19e | ||
|
|
4543008012 | ||
|
|
d54a648792 | ||
|
|
13a3f22001 | ||
|
|
75e80bc2ff | ||
|
|
386ae2067b | ||
|
|
b289de26a6 | ||
|
|
415f5baa1c | ||
|
|
3fdfbff09b | ||
|
|
163225e180 | ||
|
|
1369c2029b | ||
|
|
4f31d7504a | ||
|
|
585955eb19 | ||
|
|
1a5b2576f7 | ||
|
|
ddc4d76668 | ||
|
|
f5e400de69 | ||
|
|
9c8059ea96 | ||
|
|
c62db950f1 | ||
|
|
9c9953bb60 | ||
|
|
acaf15c5d2 | ||
|
|
25569db053 | ||
|
|
a391038d27 | ||
|
|
9ea45a71f5 | ||
|
|
ea39836b88 | ||
|
|
bfa01f5b3b | ||
|
|
23974d24c3 | ||
|
|
868947cbb4 | ||
|
|
cb942d7e81 | ||
|
|
05cf8d0edc | ||
|
|
071f15b570 | ||
|
|
e5a40fd745 | ||
|
|
f2ab4c0d0e | ||
|
|
0ba1a8e7bc | ||
|
|
ed0ca2b2d2 | ||
|
|
26404315cb | ||
|
|
be1958473b | ||
|
|
8b59875e93 | ||
|
|
accacd54f5 | ||
|
|
331a2046c8 | ||
|
|
c9f176f802 | ||
|
|
523798857b | ||
|
|
2edc8b16ae | ||
|
|
29902f48d5 | ||
|
|
d25a661701 | ||
|
|
a93d9ac71c | ||
|
|
c68af64fe5 | ||
|
|
3d9a4560d5 | ||
|
|
9120d40ce5 | ||
|
|
4db2aaffc4 | ||
|
|
155eb1ba58 | ||
|
|
efaf7ac622 | ||
|
|
6cc2205321 | ||
|
|
0a818f3f3f | ||
|
|
fe2c4af8c2 | ||
|
|
3e7dd30fd7 | ||
|
|
42f47f51b5 | ||
|
|
aea9e8efa2 | ||
|
|
a6cd67cc65 | ||
|
|
585ae28dd2 | ||
|
|
4abac92891 | ||
|
|
a813be7d54 | ||
|
|
e77957bc81 | ||
|
|
9b6f26c191 | ||
|
|
385cc3f497 | ||
|
|
c0db39594b | ||
|
|
add4cf4232 | ||
|
|
586d613a27 | ||
|
|
45334064b6 | ||
|
|
ca84a1a10e | ||
|
|
14008703f6 | ||
|
|
58edfbc485 | ||
|
|
fa555c1f09 | ||
|
|
75210b1ff6 | ||
|
|
b278751834 | ||
|
|
3b192ca490 | ||
|
|
12dd225db2 | ||
|
|
56d5f08128 | ||
|
|
256284d76f | ||
|
|
cf5ebd128c | ||
|
|
5b597028fe | ||
|
|
012d1fa8bd | ||
|
|
1b426b67e7 | ||
|
|
8d50049db7 | ||
|
|
cba9fb1a07 | ||
|
|
932fc8e3c7 | ||
|
|
5884cf88d3 | ||
|
|
d2157fa28c | ||
|
|
6e43f9bdd0 | ||
|
|
d9ed654f04 | ||
|
|
8090db2e75 | ||
|
|
652a946e09 | ||
|
|
d6d90f03a0 | ||
|
|
d7b3c7b681 | ||
|
|
c158771f59 | ||
|
|
63c4b2748c | ||
|
|
9bc3d6d315 | ||
|
|
1a59389261 | ||
|
|
221a9bab54 | ||
|
|
102fb8ec40 | ||
|
|
db89c4236a | ||
|
|
b1048556c6 | ||
|
|
11194f339d | ||
|
|
c95e847890 | ||
|
|
4daa7c23a0 | ||
|
|
3e8e751dc7 | ||
|
|
239474b01e | ||
|
|
12b579bc34 | ||
|
|
6d614e028a | ||
|
|
a234888d44 | ||
|
|
5e0a0765ce | ||
|
|
3af742f103 | ||
|
|
9452a389a5 | ||
|
|
766ef84af4 | ||
|
|
5b8d504817 | ||
|
|
61fe9fd1fe | ||
|
|
33ba1f25f3 | ||
|
|
2106eef4b2 | ||
|
|
23998ef720 | ||
|
|
1332381e2d | ||
|
|
7f98998765 | ||
|
|
5aef09ce5d | ||
|
|
69e15e9c7b | ||
|
|
9e1170fc56 | ||
|
|
5a36a26dd1 | ||
|
|
a92b310e0e | ||
|
|
b40344f1f0 | ||
|
|
36b32cad0f | ||
|
|
7b127c23f5 | ||
|
|
9acedb3408 | ||
|
|
5f54582692 | ||
|
|
63d8794902 | ||
|
|
ede9e5095d | ||
|
|
abd9778ef3 | ||
|
|
299e3fe957 | ||
|
|
3e7e251828 | ||
|
|
f2120672d0 | ||
|
|
d3ab2023ae | ||
|
|
cdcd139171 | ||
|
|
88e1780c68 | ||
|
|
68e10d7b53 | ||
|
|
378b655cd2 | ||
|
|
b7fa48a1eb | ||
|
|
eb652d53ac | ||
|
|
c53985c0bc | ||
|
|
f60c398f32 | ||
|
|
bb387cfe4b | ||
|
|
341e440c07 | ||
|
|
e6b9b67825 | ||
|
|
9c6183e6a0 | ||
|
|
2aaa6c6e04 | ||
|
|
80a5c53cb2 | ||
|
|
e4a71afe63 | ||
|
|
23ea7ecbcc | ||
|
|
5cdb35f508 | ||
|
|
03668116d7 | ||
|
|
f3d8a2bcb0 | ||
|
|
09ae961221 | ||
|
|
d015e97eae | ||
|
|
b4aecfbf23 | ||
|
|
df7f8259a1 | ||
|
|
fff71e449e | ||
|
|
d4003f9527 | ||
|
|
9acd2f5d22 | ||
|
|
d30605c09f | ||
|
|
9ff6d44178 | ||
|
|
90b163dc1d | ||
|
|
2d97126baf | ||
|
|
3f3160e220 | ||
|
|
065811cc46 | ||
|
|
e69956c9ea | ||
|
|
e96271a8a9 | ||
|
|
f0c9aa1585 | ||
|
|
ce269f8c6d | ||
|
|
4515d3e3cb | ||
|
|
c80da05e94 | ||
|
|
bef873e1f8 | ||
|
|
a5e3a74e93 | ||
|
|
d9290f2e03 | ||
|
|
98ffbaf87a | ||
|
|
1e1c0a9aa3 | ||
|
|
9979d4feb7 | ||
|
|
5f2d346b9b | ||
|
|
64a96b26ad | ||
|
|
0db1a7743d | ||
|
|
a641488b98 | ||
|
|
371cfc1cce | ||
|
|
46b0590e4e | ||
|
|
95393cde72 | ||
|
|
ea6846e2f9 | ||
|
|
9b22149509 | ||
|
|
ce1fc386a2 | ||
|
|
77bebe3000 | ||
|
|
9292d81052 | ||
|
|
e1985eeb4f | ||
|
|
53768c84d6 | ||
|
|
3c2840f7d1 | ||
|
|
32f6f359a4 | ||
|
|
0428de6285 | ||
|
|
92f0bf54f1 | ||
|
|
8fcfde1e42 | ||
|
|
e0dfc4c0b4 | ||
|
|
80a806aaad | ||
|
|
762d57fd88 | ||
|
|
732cb925e5 | ||
|
|
f59a3ca417 | ||
|
|
deb7591d1e | ||
|
|
82c54b1b54 | ||
|
|
8d942bcc86 | ||
|
|
c39d42cc62 | ||
|
|
51a45d745e | ||
|
|
544fc63b6b | ||
|
|
e06518c594 | ||
|
|
012a193685 | ||
|
|
dc2ab714f6 | ||
|
|
4c6fd79f07 | ||
|
|
293b42b9d4 | ||
|
|
88ab42cc15 | ||
|
|
7429a6bc8a | ||
|
|
89ca0dec5e | ||
|
|
9045657352 | ||
|
|
3984a58025 | ||
|
|
237d6f8689 | ||
|
|
79a7b7b1a3 | ||
|
|
b81345f063 | ||
|
|
87340ceca8 | ||
|
|
7a58813254 | ||
|
|
3d9c482eae | ||
|
|
5d97a293fe | ||
|
|
3c8ce640c4 | ||
|
|
efafd7c01c | ||
|
|
fb165dfec1 | ||
|
|
248c8a745c | ||
|
|
7c47bfd0db | ||
|
|
e96ea719d5 | ||
|
|
17cf4bf402 | ||
|
|
04c17995a2 | ||
|
|
4994a7ef6f | ||
|
|
e3d9ac4840 | ||
|
|
0c69f7649c | ||
|
|
84a3f6883d | ||
|
|
8f8c8e6614 | ||
|
|
1b4f997951 | ||
|
|
6e6185dba2 | ||
|
|
1f134fdb72 | ||
|
|
64b001a505 | ||
|
|
5f4d81866f | ||
|
|
19303f7bd7 | ||
|
|
a967caa91f | ||
|
|
3ce16227ba | ||
|
|
3e7351cb33 | ||
|
|
4021d7bf5c | ||
|
|
68472f90eb | ||
|
|
7ad658ee3a | ||
|
|
0ee5ff3aad | ||
|
|
9a0da3cd4f | ||
|
|
e3b547c8a9 | ||
|
|
e602ca1d66 | ||
|
|
01e2ea24da | ||
|
|
f5783ae1df | ||
|
|
49445f0663 | ||
|
|
27da2e10ff | ||
|
|
7d0e45b507 | ||
|
|
9b40d91a9b | ||
|
|
02c68c3a70 | ||
|
|
a0d09c9954 | ||
|
|
c7e3eae9dd | ||
|
|
70cc52e203 | ||
|
|
51849c6140 | ||
|
|
fe07c48431 | ||
|
|
d8f20f3642 | ||
|
|
828def3b25 | ||
|
|
97228a4249 | ||
|
|
3e3aff040e | ||
|
|
adc718f4d5 | ||
|
|
22c148a39e | ||
|
|
70cddcb9ca | ||
|
|
2b90790071 | ||
|
|
070272489d | ||
|
|
538d8a6fb4 | ||
|
|
c8be38e75d | ||
|
|
303a88730c | ||
|
|
26a1ba543f | ||
|
|
2e2a716710 | ||
|
|
4c7e19adeb | ||
|
|
59f053b1db | ||
|
|
dce35f453d | ||
|
|
3a416636f1 | ||
|
|
bbd033c254 | ||
|
|
22dc5b7416 | ||
|
|
40c73719c0 | ||
|
|
022792709d | ||
|
|
b9ec7ac886 | ||
|
|
32eb42a92f | ||
|
|
5d8b770e6c | ||
|
|
0fe18ae6dc | ||
|
|
d0dbd185ad | ||
|
|
e11a08064d | ||
|
|
e424112020 | ||
|
|
4a56dfcd00 | ||
|
|
6a8cd7090a | ||
|
|
c57d8995c6 | ||
|
|
da65cc99d9 | ||
|
|
7dde4c03a7 | ||
|
|
326a7d79f0 | ||
|
|
dd3fcb6461 | ||
|
|
fa90dbbd5e | ||
|
|
dd1daa5bff | ||
|
|
154dd5c9ae | ||
|
|
2ee7367567 | ||
|
|
3da10f28c4 | ||
|
|
612e7560ae | ||
|
|
fe362a1ab5 | ||
|
|
8399107826 | ||
|
|
077bc7323c | ||
|
|
6f2b559c5a | ||
|
|
fec0a6baf6 | ||
|
|
ac75bdf2d4 | ||
|
|
56859e03c3 | ||
|
|
959e10f720 | ||
|
|
0991255534 | ||
|
|
199d3fd422 | ||
|
|
c07109e69c | ||
|
|
08e7bb1bf4 | ||
|
|
d0010cf9cb | ||
|
|
ecd675926a | ||
|
|
0c3be639c5 | ||
|
|
3a9801853d | ||
|
|
3907be3c8f | ||
|
|
9421457b3a | ||
|
|
ac4a14ef6c | ||
|
|
c613118199 | ||
|
|
755db4d56b | ||
|
|
2e180d5548 | ||
|
|
bf9840c2a8 | ||
|
|
f56887bde9 | ||
|
|
23fe1c0985 | ||
|
|
5266f17d56 | ||
|
|
744f75d4a3 | ||
|
|
37435365e2 | ||
|
|
94fc0febc7 | ||
|
|
6f58ef2394 | ||
|
|
177f8ed653 | ||
|
|
09203dc512 | ||
|
|
3c3d5d472e | ||
|
|
4c6e64c89b | ||
|
|
7afee98f99 | ||
|
|
f562926aaa | ||
|
|
b25c83edc4 | ||
|
|
c42b5e043d | ||
|
|
1e5921d33f | ||
|
|
663344eeaa | ||
|
|
e4e34cc835 | ||
|
|
b36fc0e2ae | ||
|
|
924d6ada60 | ||
|
|
8343cadd30 | ||
|
|
0636dc45bd | ||
|
|
611ee64cd9 | ||
|
|
5a17e7f425 | ||
|
|
db39f0cc88 | ||
|
|
3f48bce7da | ||
|
|
936b491248 | ||
|
|
428e8ef427 | ||
|
|
934dffd273 | ||
|
|
0c34a5081c | ||
|
|
f09682131f | ||
|
|
32ddc2a47f | ||
|
|
729f534614 | ||
|
|
6937d0c17e | ||
|
|
4dba8219ca | ||
|
|
f8b0ec8c4b | ||
|
|
ce20da28e1 | ||
|
|
40ed87d8de | ||
|
|
5bae732818 | ||
|
|
08b3de08e7 | ||
|
|
a51c5d93fc | ||
|
|
55dbb2ca3f | ||
|
|
4b930c7854 | ||
|
|
d68823708f | ||
|
|
4b5d09a968 | ||
|
|
7e4a7ac23d | ||
|
|
62cdf2ae5b | ||
|
|
94c42160b7 | ||
|
|
18bbfebc5d | ||
|
|
d18cb1f74c | ||
|
|
2807841511 | ||
|
|
13ed8d4529 | ||
|
|
1ff06c2c1e | ||
|
|
0cb591821a | ||
|
|
8700f44175 | ||
|
|
6ba73a732a | ||
|
|
4b97d8bcda | ||
|
|
0dc6f1674f | ||
|
|
6bc6f0dd70 | ||
|
|
39abd82e5d | ||
|
|
15924aebaa | ||
|
|
b79c95d295 | ||
|
|
453c0d890d | ||
|
|
60f0f68e68 | ||
|
|
79adaa11e0 | ||
|
|
6819050d91 | ||
|
|
d2740f78c1 | ||
|
|
d4efb55492 | ||
|
|
6953e829c4 | ||
|
|
ef270eb642 | ||
|
|
d1af73bfcb | ||
|
|
1365020302 | ||
|
|
0e7013eeb0 | ||
|
|
a3a0db447b | ||
|
|
a46e459124 | ||
|
|
dfed24c290 | ||
|
|
1f308a43c8 | ||
|
|
2062e55c6a | ||
|
|
90038d2924 | ||
|
|
9aff6ca633 | ||
|
|
6aa61657e0 | ||
|
|
2958b14cc2 | ||
|
|
aa6674b032 | ||
|
|
7a7bca2991 | ||
|
|
7e9f90a09d | ||
|
|
5e8373fa46 | ||
|
|
9d826016b0 | ||
|
|
7f1dd248c2 | ||
|
|
4d5e7c0557 | ||
|
|
9e99a2bc37 | ||
|
|
8dafbaeda2 | ||
|
|
ae35f15f15 | ||
|
|
0dd91ceda2 | ||
|
|
d6f8112860 | ||
|
|
3589537147 | ||
|
|
26b8a1fe1d | ||
|
|
a1db6c6a9b | ||
|
|
271d15f989 | ||
|
|
00e5d42459 | ||
|
|
291fdfac68 | ||
|
|
5e31e3fad0 | ||
|
|
609235b4f1 | ||
|
|
b3ad557dd2 | ||
|
|
7f6395fa7d | ||
|
|
aee9f454fc | ||
|
|
e3c3b05396 | ||
|
|
6e637456ef | ||
|
|
9c7c279a5b | ||
|
|
5e5ffec67d | ||
|
|
06cadacb59 | ||
|
|
cb8e0a50bc | ||
|
|
b3a5283517 | ||
|
|
5348046109 | ||
|
|
57d48b64eb | ||
|
|
5145b1956c | ||
|
|
bb48e5209e | ||
|
|
37cba10c14 | ||
|
|
1decb1c7fb | ||
|
|
ba1347a8ce | ||
|
|
feb01b270e | ||
|
|
114a256675 | ||
|
|
2897e5f17e | ||
|
|
6723758edc | ||
|
|
23956a0b82 | ||
|
|
93a43ae9a5 | ||
|
|
8905e7cbb7 | ||
|
|
bf8b87c29d | ||
|
|
803c396fa2 | ||
|
|
0933261898 | ||
|
|
e93d362391 | ||
|
|
2b13de80bf | ||
|
|
2c67f4cb39 | ||
|
|
4705683ebc | ||
|
|
78baf568ae | ||
|
|
1218f4aeb6 | ||
|
|
531c6cc375 | ||
|
|
edf3fcd398 | ||
|
|
c67f065d90 | ||
|
|
148846c02d | ||
|
|
8afb2dbdec | ||
|
|
14be566401 | ||
|
|
0577ecbccf | ||
|
|
880dd2546f | ||
|
|
c2063c869d | ||
|
|
49a133514a | ||
|
|
94dc801150 | ||
|
|
fe118e9683 | ||
|
|
e0d993a5a8 | ||
|
|
cf35943f51 | ||
|
|
cd715178d2 | ||
|
|
869b684536 | ||
|
|
bc56ce754b | ||
|
|
32897450fc | ||
|
|
e0e9942bd5 | ||
|
|
fdbd1c5658 | ||
|
|
eaf983c054 | ||
|
|
e11eeb24fc | ||
|
|
6dcd8c3af8 | ||
|
|
d68eab6b65 | ||
|
|
8ec6eaa49a | ||
|
|
a38f561d7c | ||
|
|
cb404b2730 | ||
|
|
83d3c02e53 | ||
|
|
f376d5d59c | ||
|
|
2493659b23 | ||
|
|
e1efacb399 | ||
|
|
05d793c34b | ||
|
|
86867dcbe3 | ||
|
|
8be58bcd21 | ||
|
|
06e38b45c8 | ||
|
|
d3dd671759 | ||
|
|
e0b8c338a8 | ||
|
|
ee363ebb74 | ||
|
|
e4bb3ecd12 | ||
|
|
d05bfb55c5 | ||
|
|
9c26983136 | ||
|
|
fa622168a0 | ||
|
|
eff814b148 | ||
|
|
11c373a183 | ||
|
|
898b697b70 | ||
|
|
6d8026cd81 | ||
|
|
1e7abdc144 | ||
|
|
ff1b28244b | ||
|
|
7782fa09ac | ||
|
|
ae624801ac | ||
|
|
8889bda261 | ||
|
|
c8eac04e9b | ||
|
|
a5fa4df37c | ||
|
|
d96dcfba59 | ||
|
|
690a317f4f | ||
|
|
9c4a0d2397 | ||
|
|
2183240221 | ||
|
|
33800954ec | ||
|
|
67cb5a4dde | ||
|
|
9fd7e333df | ||
|
|
a9628cc0f0 | ||
|
|
f33de46508 | ||
|
|
595d452c23 | ||
|
|
911e670be6 | ||
|
|
9ea973dad6 | ||
|
|
fcdd45341c | ||
|
|
53d2d10932 | ||
|
|
88772a1c34 | ||
|
|
1c21590e96 | ||
|
|
d2a8cfe614 | ||
|
|
39ff3b199a | ||
|
|
ddf070b63d | ||
|
|
4c559a4a08 | ||
|
|
fa16c49246 | ||
|
|
d382f6886d | ||
|
|
02e111c5e1 | ||
|
|
73516eea4c | ||
|
|
6e2dbd4e1c | ||
|
|
67cdbef833 | ||
|
|
d6bb72f772 | ||
|
|
e6dd4882cc | ||
|
|
cb62e65f9f | ||
|
|
cb5e282af4 | ||
|
|
b175d8a0cb | ||
|
|
fbb88a55cb | ||
|
|
f3a40ac794 | ||
|
|
dc207a449c | ||
|
|
5a8de90918 | ||
|
|
2d6b770e7c | ||
|
|
409eee3bb4 | ||
|
|
ac5bb86301 | ||
|
|
530d376c44 | ||
|
|
b777ba9549 | ||
|
|
bc39b707d4 | ||
|
|
cb0791c915 | ||
|
|
03c73f56d2 | ||
|
|
94d0c78913 | ||
|
|
34463dcddc | ||
|
|
da11da97ad | ||
|
|
c0043a5467 | ||
|
|
7770b1a82b | ||
|
|
faf592adb4 | ||
|
|
0aa57854ca | ||
|
|
fd8c1becec | ||
|
|
0afc3d83c6 | ||
|
|
d633fe5deb | ||
|
|
5040cb83d0 | ||
|
|
2b385ff1f4 | ||
|
|
cd5028eed1 | ||
|
|
3ce014d5f5 | ||
|
|
75aaf1c66d | ||
|
|
26401a4fbf | ||
|
|
dba757f0c2 | ||
|
|
7f3ee9ca71 | ||
|
|
9a1414505a | ||
|
|
13c1e807ad | ||
|
|
6e95e19589 | ||
|
|
8f47596ad0 | ||
|
|
4f4c63b1dd | ||
|
|
66323fe9ca | ||
|
|
16e60bbb5f | ||
|
|
0389d2495f | ||
|
|
4049c54511 | ||
|
|
e8006c3253 | ||
|
|
07aa9595c0 | ||
|
|
b91e97ca53 | ||
|
|
cd0f7af38a | ||
|
|
ac1bf4a9f8 | ||
|
|
af0046f401 | ||
|
|
43575b485d | ||
|
|
67c6cfce71 | ||
|
|
5986874be2 | ||
|
|
cf17b4f63c | ||
|
|
d1ac48b2a1 | ||
|
|
3032ce3bee | ||
|
|
ba69f9e62a | ||
|
|
8323df240b | ||
|
|
a1ae770f70 | ||
|
|
56938344b8 | ||
|
|
a862e641f1 | ||
|
|
00b9ac676e | ||
|
|
8bb6aa2c51 | ||
|
|
505392c2f8 | ||
|
|
37f9c25212 | ||
|
|
ee2c1ad8fa | ||
|
|
7771356e66 | ||
|
|
cb417a3d51 | ||
|
|
01dcb52b4c | ||
|
|
24adb6e3e0 | ||
|
|
d992f8525b | ||
|
|
7be094b563 | ||
|
|
386a68e334 | ||
|
|
ca57c8424d | ||
|
|
214f53b8a7 | ||
|
|
143310bdb7 | ||
|
|
dc8b8ccab3 | ||
|
|
e3c095a3fa | ||
|
|
61f49938e5 | ||
|
|
d697421d81 | ||
|
|
f71619d541 | ||
|
|
0eb1d4c7c0 | ||
|
|
5cfe9ef181 | ||
|
|
d790292829 | ||
|
|
fce0ef6ad2 | ||
|
|
f9269dcc1c | ||
|
|
4b163e6d30 | ||
|
|
147c702f2f | ||
|
|
b1f23f9ff6 | ||
|
|
53eb569216 | ||
|
|
7c8105247c | ||
|
|
35ae421ac1 | ||
|
|
e3e161f281 | ||
|
|
8f9800eb3c | ||
|
|
a5593963c5 | ||
|
|
e308281b0b | ||
|
|
0ce8d92f27 | ||
|
|
938a9f372f | ||
|
|
a0514c242b | ||
|
|
b96eb14cf7 | ||
|
|
1636d36dc2 | ||
|
|
9bb2870e38 | ||
|
|
d9545e5e78 | ||
|
|
827105405f | ||
|
|
2f8fec6b70 | ||
|
|
20ecfcd8e0 | ||
|
|
b539ed5a3d | ||
|
|
4eab7d6503 | ||
|
|
8a4239d48d | ||
|
|
cedc1e0eb2 | ||
|
|
4beba75159 | ||
|
|
a0cbac4fc7 | ||
|
|
9662ab106f | ||
|
|
4e4a9827b1 | ||
|
|
04ee7c3a55 | ||
|
|
a85a856215 | ||
|
|
9e30fc253f | ||
|
|
b2895770b8 | ||
|
|
37255354d4 | ||
|
|
661b53d0b3 | ||
|
|
56e256fc86 | ||
|
|
1f7dfecf89 | ||
|
|
6f121b90c1 | ||
|
|
2d48e73f9d | ||
|
|
58a747e8ac | ||
|
|
3bf5f19446 | ||
|
|
da4062ede9 | ||
|
|
e700a7498e | ||
|
|
6f27d05361 | ||
|
|
baefab7e3d | ||
|
|
7dda1c28f4 | ||
|
|
364c96f45c | ||
|
|
7aa163f713 | ||
|
|
62fb743a20 | ||
|
|
40211efa9a | ||
|
|
be98a228a7 | ||
|
|
1f7171462b | ||
|
|
511d728337 | ||
|
|
61b39f4257 | ||
|
|
3e4bd20919 | ||
|
|
7d10660b87 | ||
|
|
6aa4765c3e | ||
|
|
fa68108907 | ||
|
|
771c09226e | ||
|
|
8d0ea1d03e | ||
|
|
83953c7fb3 | ||
|
|
8b94443ba2 | ||
|
|
5e8d3acc51 | ||
|
|
d347096396 | ||
|
|
54920f13df | ||
|
|
d01a33814c | ||
|
|
efd2e434b4 | ||
|
|
2202e13a61 | ||
|
|
7702a7a8d0 | ||
|
|
8320f0598f | ||
|
|
165c1622f8 | ||
|
|
b8c0d7f59e | ||
|
|
6197ba8af6 | ||
|
|
89a3fd6323 | ||
|
|
ec18dd9535 | ||
|
|
bb4c73b25c | ||
|
|
90e0c070ac | ||
|
|
83b7f795c1 | ||
|
|
0366035237 | ||
|
|
a8f7b4fc5c | ||
|
|
f2d588574c | ||
|
|
0579ecd30f | ||
|
|
b5d9bf5dc8 | ||
|
|
413882a8d5 | ||
|
|
c92f8f71a7 | ||
|
|
a378379ac5 | ||
|
|
bcb4c9a722 | ||
|
|
eb22ff53c4 | ||
|
|
b1406e8ecd | ||
|
|
4eee187f1b | ||
|
|
76a8fe4873 | ||
|
|
f010e2be12 | ||
|
|
7484c51490 | ||
|
|
96c4044a6c | ||
|
|
3d9a97348e | ||
|
|
81b6c1c333 | ||
|
|
a62cb2a93f | ||
|
|
e9f26fe29d | ||
|
|
3ae7ecaeb3 | ||
|
|
75e690791d | ||
|
|
f2c927906f | ||
|
|
61751cc306 | ||
|
|
ba11b849ed | ||
|
|
014a09e222 | ||
|
|
b535c24edb | ||
|
|
8d2bea03e0 | ||
|
|
497ae6d269 | ||
|
|
e7eeba1de0 | ||
|
|
d14ce5ac39 | ||
|
|
76dae35955 | ||
|
|
70d45f23de | ||
|
|
9735dedf2f | ||
|
|
a8cc5b7cef | ||
|
|
003bbea358 | ||
|
|
5be28ce93d | ||
|
|
647b2658d1 | ||
|
|
85240f0145 | ||
|
|
9119635ed3 | ||
|
|
ab16867f6b | ||
|
|
73cf465ce4 | ||
|
|
37181e410f | ||
|
|
1ffc593993 | ||
|
|
8ef383a4d3 | ||
|
|
3023c8a72b | ||
|
|
9b68b0c1e2 | ||
|
|
01a33dcf7e | ||
|
|
4000654deb | ||
|
|
90ff7f24b3 | ||
|
|
b42f020ad5 | ||
|
|
6422005716 | ||
|
|
efc9048b43 | ||
|
|
12bc507156 | ||
|
|
f9a7ffa5e8 | ||
|
|
b9a2f58e23 | ||
|
|
b146f495fc | ||
|
|
4a1f441151 | ||
|
|
94ec8cb997 | ||
|
|
621e33fde2 | ||
|
|
db72378806 | ||
|
|
d596f4ea52 | ||
|
|
6f2016db06 | ||
|
|
27e742df12 | ||
|
|
86d823b877 | ||
|
|
82697ca2a9 | ||
|
|
4606a18b25 | ||
|
|
9145589414 | ||
|
|
1d78d7c720 | ||
|
|
1cc2ec9095 | ||
|
|
5cf4e34607 | ||
|
|
b32de42ab7 | ||
|
|
b04a48f126 | ||
|
|
3c0a34926a | ||
|
|
039b42868d | ||
|
|
671c247381 | ||
|
|
9048c108c4 | ||
|
|
b797e0af1a | ||
|
|
85b5b4e965 | ||
|
|
74062fab12 | ||
|
|
67ce4cfbef | ||
|
|
fe464af3ff | ||
|
|
45b091028b | ||
|
|
00619d5795 | ||
|
|
a2cba95a3a | ||
|
|
fd962869e6 | ||
|
|
2e953bd1a9 | ||
|
|
57f9e7dda6 | ||
|
|
d14ce61520 | ||
|
|
5af6506d86 | ||
|
|
e9e4a1296d | ||
|
|
85c2126775 | ||
|
|
a1391f3d0b | ||
|
|
bb8ba4225c | ||
|
|
7d3e8c0a57 | ||
|
|
55c3040db1 | ||
|
|
90e4fbed31 | ||
|
|
4819790272 | ||
|
|
f904ba53e2 | ||
|
|
e06b7412ac | ||
|
|
dec1b8dfb4 | ||
|
|
c9b5332d16 | ||
|
|
fe14a360b4 | ||
|
|
ab7a67464b | ||
|
|
29a48cb34c | ||
|
|
3fef353291 | ||
|
|
1a700fd06b | ||
|
|
e3e2f3afe5 | ||
|
|
87f380b90c | ||
|
|
3ebb4d0ea3 | ||
|
|
d4b4a4a864 | ||
|
|
7663da80c3 | ||
|
|
bd6532fae4 | ||
|
|
25235b5296 | ||
|
|
103077b686 | ||
|
|
fbef500fb3 | ||
|
|
37ee9752e1 | ||
|
|
2c17af4850 | ||
|
|
7d8b63fd88 | ||
|
|
5be982cc72 | ||
|
|
2d968cf328 | ||
|
|
4d9563ea03 | ||
|
|
a6572dd042 | ||
|
|
d62a12dd9a | ||
|
|
8a99d64139 | ||
|
|
99478ba9bd | ||
|
|
1c0262a8c4 | ||
|
|
211d3c5213 | ||
|
|
20c7c36996 | ||
|
|
228dab5965 | ||
|
|
4b955a320b | ||
|
|
ee67d350e3 | ||
|
|
60e3a78221 | ||
|
|
b2105a113c | ||
|
|
c293a7a26d | ||
|
|
d5911b33b1 | ||
|
|
f1638b09c5 | ||
|
|
741fcfb202 | ||
|
|
54d54b1457 | ||
|
|
d5b6ccb3e2 | ||
|
|
6448964c37 | ||
|
|
46378e3738 | ||
|
|
b2038e76d3 | ||
|
|
eb650b71ad | ||
|
|
968994bba5 | ||
|
|
3c1c13850e | ||
|
|
459f4a9788 | ||
|
|
d17fdea884 | ||
|
|
b20efff57c | ||
|
|
36159e6622 | ||
|
|
c953ba0852 | ||
|
|
b38ef43260 | ||
|
|
fea2395a80 | ||
|
|
ffaab11da9 | ||
|
|
f6b3603934 | ||
|
|
9421963b29 | ||
|
|
239c13da28 | ||
|
|
eb6f67ed07 | ||
|
|
c206e72f7b | ||
|
|
79e6ebbe23 | ||
|
|
d4638a9cf4 | ||
|
|
7ccc9b0795 | ||
|
|
6c1d911193 | ||
|
|
9587aacee3 | ||
|
|
777562aea8 | ||
|
|
a40d64d3a6 | ||
|
|
7704d9b2ef | ||
|
|
d87dd2a60a | ||
|
|
6403a265de | ||
|
|
3fa4a36983 | ||
|
|
8b16c30fb8 | ||
|
|
20a177c783 | ||
|
|
0840d9ec25 | ||
|
|
4124e01d65 | ||
|
|
129325f3a4 | ||
|
|
9cd22a98bd | ||
|
|
6a6d21ed32 | ||
|
|
041315da44 | ||
|
|
aa30661c26 | ||
|
|
031bac8d13 | ||
|
|
4dae13d7bc | ||
|
|
5140bb8d7f | ||
|
|
320a3b0834 | ||
|
|
79405c7cc9 | ||
|
|
99fa5d0252 | ||
|
|
b584e89d90 | ||
|
|
7f1491f884 | ||
|
|
0cf1e3b1da | ||
|
|
441795943b | ||
|
|
a9cf3357c7 | ||
|
|
9fbb8a8201 | ||
|
|
4aa5778606 | ||
|
|
338b404055 | ||
|
|
500ff629bf | ||
|
|
033a947631 | ||
|
|
c08c35df69 | ||
|
|
cefe42fd66 | ||
|
|
e0cd5edddb | ||
|
|
ebd1da2730 | ||
|
|
4bbcd5daef | ||
|
|
8d88ecb951 | ||
|
|
b5e1382232 | ||
|
|
8f5c72c510 | ||
|
|
c52453faa3 | ||
|
|
8c9aa2588c | ||
|
|
d03d29f6f5 | ||
|
|
77f8da275a | ||
|
|
84761e62ff | ||
|
|
60a1c4f0cc | ||
|
|
0c6c0003b1 | ||
|
|
1c49d76fb7 | ||
|
|
714084bf5b | ||
|
|
2efdf56317 | ||
|
|
7fc09da482 | ||
|
|
d315a838bd | ||
|
|
6879c1f097 | ||
|
|
25860f6263 | ||
|
|
c52d4b7998 | ||
|
|
0c62967d8a | ||
|
|
f34db62940 | ||
|
|
77b23eec9f | ||
|
|
f4bcea6182 | ||
|
|
ea6a86a83d | ||
|
|
47879942bb | ||
|
|
6c006e087d | ||
|
|
8385563bef | ||
|
|
f9f96552b7 | ||
|
|
b0ed8a5ba3 | ||
|
|
ca3913cd88 | ||
|
|
8b07916598 | ||
|
|
5f122a7435 | ||
|
|
50c656df94 | ||
|
|
5436658ce7 | ||
|
|
d7ea40d850 | ||
|
|
184ca6517c | ||
|
|
f4c36f49db | ||
|
|
ae26783902 | ||
|
|
45fdd74dd2 | ||
|
|
880a9651d8 | ||
|
|
95ff769020 | ||
|
|
9b158f5926 | ||
|
|
29c2169012 | ||
|
|
db30358d06 | ||
|
|
ebbe22b09a | ||
|
|
752dd13c04 | ||
|
|
469a080000 | ||
|
|
efc12f1045 | ||
|
|
becb58223a | ||
|
|
56ef16b0f9 | ||
|
|
eeda097603 | ||
|
|
77e296ffef | ||
|
|
f48335f2f2 | ||
|
|
8b5926f9b1 | ||
|
|
72d5dfed34 | ||
|
|
7f8caf1634 | ||
|
|
1871f39b2b | ||
|
|
6eae7acd34 | ||
|
|
36a5247181 | ||
|
|
153b8cbcc3 | ||
|
|
44a8ede94d | ||
|
|
529bb53d52 | ||
|
|
b35415637b | ||
|
|
35e42a2295 | ||
|
|
0b13bf393f | ||
|
|
58b5e1a9df | ||
|
|
dbabb861f2 | ||
|
|
224bf07930 | ||
|
|
870ae030ca | ||
|
|
9ba39f65b3 | ||
|
|
3d8fe065b5 | ||
|
|
513381a322 | ||
|
|
c36f415793 | ||
|
|
17f719558c | ||
|
|
3617e8e7a1 | ||
|
|
70abee3e28 | ||
|
|
37defbbd14 | ||
|
|
65cf77c32b | ||
|
|
e0ce5640d1 | ||
|
|
e7f369a765 | ||
|
|
58429bbc79 | ||
|
|
5fc39662ec | ||
|
|
4c73f026b2 | ||
|
|
932ad73441 | ||
|
|
bf0d694c71 | ||
|
|
a2e689aba3 | ||
|
|
c82eb39d54 | ||
|
|
a00256a61c | ||
|
|
842a15ee45 | ||
|
|
e7785c9ccb | ||
|
|
62f04137a5 | ||
|
|
5f849c4823 | ||
|
|
b09242e41c | ||
|
|
1538bc609d | ||
|
|
26616314f8 | ||
|
|
1483b21f00 | ||
|
|
743c5ca8d5 | ||
|
|
92b89936b3 | ||
|
|
2b521ee201 | ||
|
|
8abbef8dbd | ||
|
|
59f3b63e0a | ||
|
|
6a6f341c07 | ||
|
|
ce27aad67b | ||
|
|
6784b9062e | ||
|
|
f23ecc6895 | ||
|
|
ae6b460f35 | ||
|
|
402a596415 | ||
|
|
52eb84d34b | ||
|
|
f3a2f46fb3 | ||
|
|
4880ca3ca2 | ||
|
|
121c72c9e0 | ||
|
|
e20e114643 | ||
|
|
7e08104631 | ||
|
|
7aa7f4dbbd | ||
|
|
fb6fd61cd9 | ||
|
|
1ca28badad | ||
|
|
34da3e0ccd | ||
|
|
0a22040c6e | ||
|
|
c55b7dcda7 | ||
|
|
78f8932313 | ||
|
|
f00181223f | ||
|
|
bf2f829382 | ||
|
|
297ca08e81 | ||
|
|
8339096ad8 | ||
|
|
3d39d78e53 | ||
|
|
00ce909fc8 | ||
|
|
aabf5f5621 | ||
|
|
9c6352ec57 | ||
|
|
7382fc7c49 | ||
|
|
5fa9632ec0 | ||
|
|
db78726656 | ||
|
|
57320c0c25 | ||
|
|
31ab710485 | ||
|
|
4247af8fa8 | ||
|
|
e5000742f1 | ||
|
|
971f9b6de5 | ||
|
|
199ebfed48 | ||
|
|
97aba69ed0 | ||
|
|
234507b7f1 | ||
|
|
d0d5fd1a3f | ||
|
|
e7234bada2 | ||
|
|
94cbb4e1e0 | ||
|
|
437ba6d7a2 | ||
|
|
574f03c139 | ||
|
|
c3abec5127 | ||
|
|
a69bda0b9b | ||
|
|
576b78799e | ||
|
|
faee030740 | ||
|
|
8b5c5826a8 | ||
|
|
e193ac2c04 | ||
|
|
ee4744e7cd | ||
|
|
142a38f3dc | ||
|
|
e50b91b559 | ||
|
|
2bf2b95b3a | ||
|
|
94cfe1217a | ||
|
|
dbb4b2c1f9 | ||
|
|
6ede01ea05 | ||
|
|
2ecfa20f94 | ||
|
|
48808e4ede | ||
|
|
955dde6d5f | ||
|
|
7299ee9f11 | ||
|
|
5e17b4bf17 | ||
|
|
2c17dce25b | ||
|
|
1b372115a5 | ||
|
|
99bd7c81da | ||
|
|
2b1ed2b20a | ||
|
|
f7c60ea9d1 | ||
|
|
119b458b0f | ||
|
|
d913ef0fc4 | ||
|
|
bccc0e63d5 | ||
|
|
23d0f33ad1 | ||
|
|
ddd17fe238 | ||
|
|
b1e3fa5f4d | ||
|
|
e99ca5947b | ||
|
|
932cf03a29 | ||
|
|
c09190f66e | ||
|
|
1d9b5d4611 | ||
|
|
e05c1ed912 | ||
|
|
7b36796f41 | ||
|
|
69bb25bb18 | ||
|
|
398d6007be | ||
|
|
4d63eb4413 | ||
|
|
8770bdc694 | ||
|
|
74f935d94f | ||
|
|
cd30812607 | ||
|
|
8b30a7631d | ||
|
|
a169f93b9f | ||
|
|
f786ea65f5 | ||
|
|
b578d44ea2 | ||
|
|
40574d9be0 | ||
|
|
7bb8124b69 | ||
|
|
2b1d4f4377 | ||
|
|
31a53f4842 | ||
|
|
f3468c0321 | ||
|
|
23af5dcaf1 | ||
|
|
097974bde2 | ||
|
|
a97d8c119b | ||
|
|
480ef0a468 | ||
|
|
f044a59984 | ||
|
|
f3ae5159cb | ||
|
|
52fca4ac0c | ||
|
|
98bf05b948 | ||
|
|
bbd4c1315e | ||
|
|
35869586c9 | ||
|
|
ed049ea539 | ||
|
|
6ba406be7d | ||
|
|
860d3be42d | ||
|
|
0801922466 | ||
|
|
103a2fccaa | ||
|
|
cb7820b45b | ||
|
|
1a6fd72d19 | ||
|
|
5e65df3c2a | ||
|
|
b534422aed | ||
|
|
1866c00789 | ||
|
|
1162e5a65b | ||
|
|
5da11291a2 | ||
|
|
042d2e436c | ||
|
|
2da65ab122 | ||
|
|
8c668b29c6 | ||
|
|
75643895ef | ||
|
|
6a02a571c1 | ||
|
|
1e5f12a0ae | ||
|
|
a297a0b5ad | ||
|
|
9da413b2cc | ||
|
|
0ca0dc9731 | ||
|
|
7205f2d4fa | ||
|
|
196c311113 | ||
|
|
0409107ee2 | ||
|
|
c8035c1adf | ||
|
|
5fda638edf | ||
|
|
ed05519c60 | ||
|
|
ac77bab967 | ||
|
|
9935e2c8d3 | ||
|
|
80fc7209ed | ||
|
|
908082097f | ||
|
|
245533defa | ||
|
|
b8c4c31e02 | ||
|
|
626df3673c | ||
|
|
3a288ffe4a | ||
|
|
422e511aac | ||
|
|
621cdba53c | ||
|
|
e7ddc6d6c5 | ||
|
|
b1a06baf83 | ||
|
|
c3c0954613 | ||
|
|
463a339a09 | ||
|
|
71cae6b02b | ||
|
|
ccac3e9cfc | ||
|
|
aac44ef866 | ||
|
|
5d6d6c766e | ||
|
|
28e6dec4b0 | ||
|
|
e2606cf97f | ||
|
|
cfea381c84 | ||
|
|
bd7e2fe88d | ||
|
|
30c32b0088 | ||
|
|
95ce9fc00f | ||
|
|
a580e98f28 | ||
|
|
2072f5c276 | ||
|
|
28c47a5c86 | ||
|
|
08dd632d87 | ||
|
|
bbde1394e1 | ||
|
|
ede52d7808 | ||
|
|
9ce9fa8cb5 | ||
|
|
6debd84a2e | ||
|
|
62995b0769 | ||
|
|
ec50c4571c | ||
|
|
09938b978b | ||
|
|
6eb327eac2 | ||
|
|
cbb8db0089 | ||
|
|
154ef82719 | ||
|
|
ec80b0884f | ||
|
|
6a78b4ed1f | ||
|
|
239c6759cb | ||
|
|
017714f3a0 | ||
|
|
16aa5a78fe | ||
|
|
baa94e2064 | ||
|
|
f9b13472b5 | ||
|
|
2922267ae1 | ||
|
|
3c4e75f1b2 | ||
|
|
130a7b3c42 | ||
|
|
17b0c23f2e | ||
|
|
4b58b0b168 | ||
|
|
298393b653 | ||
|
|
aed53c4fda | ||
|
|
7ad7af76dd | ||
|
|
0964fb11e4 | ||
|
|
f173ce11f7 | ||
|
|
3046c9e68e | ||
|
|
137836348b | ||
|
|
05eab0b5b0 | ||
|
|
a1edbaced4 | ||
|
|
3fe737058f | ||
|
|
9c3e8f7e48 | ||
|
|
dcf64c6b33 | ||
|
|
b9945d62a3 | ||
|
|
776d1cb52c | ||
|
|
81e142936d | ||
|
|
a6fba0cb96 | ||
|
|
1b9bfd8906 | ||
|
|
e9d988f5d6 | ||
|
|
7852192fc4 | ||
|
|
4db01487ba | ||
|
|
7b806add63 | ||
|
|
d3c310628f | ||
|
|
62af116654 | ||
|
|
2b085cb69e | ||
|
|
27ee4337fe | ||
|
|
f0297fc448 | ||
|
|
d74743ac1d | ||
|
|
28471aee97 | ||
|
|
deb537c1bb | ||
|
|
9d93eca572 | ||
|
|
66d1a632a7 | ||
|
|
847be54457 | ||
|
|
9d156b4285 | ||
|
|
edde871eb5 | ||
|
|
7c772d6bfd | ||
|
|
f0d0861160 | ||
|
|
1ef0b44a41 | ||
|
|
25d8a94c1c | ||
|
|
b60b3f7d18 | ||
|
|
b1db062fbc | ||
|
|
d4e5e609af | ||
|
|
f36d1f5621 | ||
|
|
f350683e83 | ||
|
|
3c5f7de747 | ||
|
|
d81288d281 | ||
|
|
d18708acf5 | ||
|
|
18353d9ae6 | ||
|
|
ef39f9c9cf | ||
|
|
a03aa3ddb3 | ||
|
|
c09aff8bd7 | ||
|
|
70518a873c | ||
|
|
95e64f3997 | ||
|
|
2fab2d9f7e | ||
|
|
de838ec5e8 | ||
|
|
90d2434bb0 | ||
|
|
96e0167e47 | ||
|
|
68ed732928 | ||
|
|
c603abfebf | ||
|
|
85960b2c90 | ||
|
|
ca501c0378 | ||
|
|
e9e364f054 | ||
|
|
7c9af89620 | ||
|
|
f4567b2c9d | ||
|
|
7390d11505 | ||
|
|
960e46c564 | ||
|
|
265f79fc72 | ||
|
|
a5258bea65 | ||
|
|
25f07ddb97 | ||
|
|
6ba7781a61 | ||
|
|
23a7dce3be | ||
|
|
880d3de53a | ||
|
|
5af7a19b40 | ||
|
|
da094fa04e | ||
|
|
bff9ca8438 | ||
|
|
e50d22bce7 | ||
|
|
216b4f4147 | ||
|
|
4ced29ee8f | ||
|
|
844b3a39a7 | ||
|
|
9e618ce3e1 | ||
|
|
abda3b52ab | ||
|
|
649f32a185 | ||
|
|
8710922a61 | ||
|
|
8ea5536b42 | ||
|
|
48d1aa5115 | ||
|
|
eafe5d6c68 | ||
|
|
f1d9034546 | ||
|
|
b0c077ccf8 | ||
|
|
a0f0eca77c | ||
|
|
e74513556a | ||
|
|
891c984c56 | ||
|
|
491188a0f3 | ||
|
|
9dadc0de93 | ||
|
|
1dedf0e208 | ||
|
|
e123499e23 | ||
|
|
7601a4cd29 | ||
|
|
c8b78b4124 | ||
|
|
fdb2055b62 | ||
|
|
2c0a03704c | ||
|
|
2edbcb996d | ||
|
|
76e01f490c | ||
|
|
f23029efe0 | ||
|
|
e70dea54c0 | ||
|
|
ca28332c6c | ||
|
|
f15e2c2dcf | ||
|
|
572705bc08 | ||
|
|
473810fc0c | ||
|
|
d0ff201da2 | ||
|
|
b5c621ae36 | ||
|
|
7cdead7bac | ||
|
|
f26ac52102 | ||
|
|
5d48708615 | ||
|
|
0561ac2076 | ||
|
|
ae5257c654 | ||
|
|
5a449a56ea | ||
|
|
69549787bc | ||
|
|
0db8d95bc9 | ||
|
|
236c16e35f | ||
|
|
79d8bc2cdd | ||
|
|
fac536f8c4 | ||
|
|
aa5d52cebc | ||
|
|
7e372645da | ||
|
|
0c058f2eca | ||
|
|
d9320f964e | ||
|
|
b29adf752c | ||
|
|
43b746d2f8 | ||
|
|
817206815d | ||
|
|
37aa201ed7 | ||
|
|
d3a0146b5a | ||
|
|
30771fefa6 | ||
|
|
6ae44d7577 | ||
|
|
42b4e456a2 | ||
|
|
290b9cae0b | ||
|
|
ec6bfa2421 | ||
|
|
46a3e729db | ||
|
|
5ca7bb5f12 | ||
|
|
86dfaf9930 | ||
|
|
7d37ff33aa | ||
|
|
415e517107 | ||
|
|
0b0ec876a5 | ||
|
|
34f6f6d539 | ||
|
|
0681209114 | ||
|
|
becd0eba03 | ||
|
|
063eb151c4 | ||
|
|
3f2a8f7704 | ||
|
|
c8b83385df | ||
|
|
ac1c8594b7 | ||
|
|
0c903c1e56 | ||
|
|
dcc19aeafb | ||
|
|
faf15df62f | ||
|
|
a3c90248a7 | ||
|
|
78365d2bc6 | ||
|
|
176b31b4a2 | ||
|
|
efe8ddf151 | ||
|
|
e1f80fba3d | ||
|
|
fd649905ea | ||
|
|
bd4988e588 | ||
|
|
4ef527a92d | ||
|
|
e8d13cd0d5 | ||
|
|
501985be48 | ||
|
|
ebe3a203ba | ||
|
|
63513ec475 | ||
|
|
545b781934 | ||
|
|
0d035746d5 | ||
|
|
ec41db7ef8 | ||
|
|
362217935f | ||
|
|
8704c07e4b | ||
|
|
7d1df4c097 | ||
|
|
2c755778f4 | ||
|
|
9ab3300b76 | ||
|
|
535b00d98f | ||
|
|
de35262a3b | ||
|
|
314a6deba9 | ||
|
|
d3990e03e6 | ||
|
|
cec7bf8488 | ||
|
|
32aa9a9f54 | ||
|
|
b7622e6009 | ||
|
|
fd1f0e685a | ||
|
|
a015d6b915 | ||
|
|
7350be6e7f | ||
|
|
926b909f3d | ||
|
|
c1076f43f7 | ||
|
|
af7123f7dd | ||
|
|
5d13112e25 | ||
|
|
40094f2867 | ||
|
|
6db7c191eb | ||
|
|
a2e2dd5bdf | ||
|
|
7fdabb73a8 | ||
|
|
86337db5b3 | ||
|
|
8e3c748f12 | ||
|
|
b825e584f3 | ||
|
|
13fe097318 | ||
|
|
5af7eb6c18 | ||
|
|
be4b885254 | ||
|
|
b70fab5384 | ||
|
|
92c321848d | ||
|
|
2de6d00a82 | ||
|
|
5744aa8d9e | ||
|
|
fc7ed1ab75 | ||
|
|
7c9b724531 | ||
|
|
64257ef428 | ||
|
|
4a0add4063 | ||
|
|
45c0eaa26c | ||
|
|
15096aa15a | ||
|
|
36f756feeb | ||
|
|
4d4a7d49d5 | ||
|
|
4189af8b50 | ||
|
|
990d526a07 | ||
|
|
5a1b03ac20 | ||
|
|
158db1c454 | ||
|
|
7ace83eeab | ||
|
|
b940a62f02 | ||
|
|
d564a062ce | ||
|
|
7671365c92 | ||
|
|
f7a58ec04d | ||
|
|
8e508cf065 | ||
|
|
e5b0473e4a | ||
|
|
136123eeb3 | ||
|
|
32b07cda86 | ||
|
|
25325e6150 | ||
|
|
a639b72e90 | ||
|
|
08984bd549 | ||
|
|
bf08a8261b |
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
|
||||||
|
|
||||||
48
.cirrus.yml
Normal file
48
.cirrus.yml
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
task:
|
||||||
|
# Seems packages for it were removed from the mirrors
|
||||||
|
# name: freebsd-12-amd64
|
||||||
|
# freebsd_instance:
|
||||||
|
# image_family: freebsd-12-4
|
||||||
|
# setup_script:
|
||||||
|
# - pkg update
|
||||||
|
# - 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-13-amd64
|
||||||
|
freebsd_instance:
|
||||||
|
image_family: freebsd-13-2
|
||||||
|
setup_script:
|
||||||
|
- pkg update
|
||||||
|
- 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-14-amd64
|
||||||
|
freebsd_instance:
|
||||||
|
image_family: freebsd-14-0-snap
|
||||||
|
setup_script:
|
||||||
|
- pkg update
|
||||||
|
- 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
|
||||||
|
test_script:
|
||||||
|
- ./scripts/cirrus/build_freebsd.sh dedicated
|
||||||
|
- ./scripts/cirrus/build_freebsd.sh full
|
||||||
9
.editorconfig
Normal file
9
.editorconfig
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# EditorConfig is awesome: https://EditorConfig.org
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = latin1
|
||||||
|
end_of_line = lf
|
||||||
|
indent_style = tab
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
3
.gitattributes
vendored
Normal file
3
.gitattributes
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
*.c text eol=lf diff=cpp
|
||||||
|
*.h text eol=lf diff=cpp
|
||||||
|
wscript text eol=lf diff=python
|
||||||
128
.github/workflows/c-cpp.yml
vendored
Normal file
128
.github/workflows/c-cpp.yml
vendored
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
name: Build & Deploy Engine
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
# cleanup:
|
||||||
|
# runs-on: self-hosted
|
||||||
|
# steps:
|
||||||
|
# - name: Cleanup
|
||||||
|
# run: rm -rf .* || true
|
||||||
|
build:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
continue-on-error: true
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
# Linux build specifically want oldest Ubuntu as possible
|
||||||
|
# to be crossdistribution compatible, otherwise use ubuntu-latest
|
||||||
|
- os: ubuntu-20.04
|
||||||
|
targetos: linux
|
||||||
|
targetarch: amd64
|
||||||
|
- os: ubuntu-20.04
|
||||||
|
targetos: linux
|
||||||
|
targetarch: i386
|
||||||
|
# - os: ubuntu-aarch64-20.04
|
||||||
|
# targetos: linux
|
||||||
|
# targetarch: aarch64
|
||||||
|
|
||||||
|
# - os: ubuntu-20.04
|
||||||
|
# targetos: android
|
||||||
|
# targetarch: 32
|
||||||
|
# - os: ubuntu-20.04
|
||||||
|
# targetos: android
|
||||||
|
# targetarch: 64
|
||||||
|
|
||||||
|
# - os: ubuntu-20.04
|
||||||
|
# targetos: motomagx
|
||||||
|
# targetarch: armv6
|
||||||
|
|
||||||
|
- os: ubuntu-latest
|
||||||
|
targetos: nswitch
|
||||||
|
targetarch: arm64
|
||||||
|
- os: ubuntu-latest
|
||||||
|
targetos: psvita
|
||||||
|
targetarch: armv7hf
|
||||||
|
- os: windows-latest
|
||||||
|
targetos: win32
|
||||||
|
targetarch: amd64
|
||||||
|
- os: windows-2019 # always use the oldest possible for 32-bit because of older compilers, and better support of certain legacy OSes
|
||||||
|
targetos: win32
|
||||||
|
targetarch: i386
|
||||||
|
env:
|
||||||
|
SDL_VERSION: 2.28.5
|
||||||
|
GH_CPU_ARCH: ${{ matrix.targetarch }}
|
||||||
|
ANDROID_SDK_TOOLS_VER: 4333796
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Install dependencies
|
||||||
|
run: bash scripts/gha/deps_${{ matrix.targetos }}.sh
|
||||||
|
- name: Build engine
|
||||||
|
run: bash scripts/gha/build_${{ matrix.targetos }}.sh
|
||||||
|
- name: Upload engine (artifacts)
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: artifact-${{ matrix.targetos }}-${{ matrix.targetarch }}
|
||||||
|
path: artifacts/*
|
||||||
|
flatpak:
|
||||||
|
name: "Flatpak"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- app: su.xash.Engine.Compat.i386
|
||||||
|
container:
|
||||||
|
image: bilelmoussaoui/flatpak-github-actions:freedesktop-22.08
|
||||||
|
options: --privileged
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Build flatpak (Compat.i386)
|
||||||
|
uses: FWGS/flatpak-github-actions/flatpak-builder@v6.1
|
||||||
|
with:
|
||||||
|
bundle: ${{ matrix.app }}.flatpak
|
||||||
|
manifest-path: scripts/flatpak/${{ matrix.app }}.yml
|
||||||
|
- name: Upload engine (artifacts)
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: artifact-${{ matrix.targetos }}-${{ matrix.targetarch }}
|
||||||
|
path: artifacts/*
|
||||||
|
release:
|
||||||
|
name: "Upload releases"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [build, flatpak]
|
||||||
|
if: ${{ github.event_name == 'push' }}
|
||||||
|
steps:
|
||||||
|
- name: Remove old release
|
||||||
|
uses: FWGS/delete-tag-and-release@v0.2.1-dev
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.ref_name == 'master' && 'continuous' || format('continuous-{0}', github.ref_name) }}
|
||||||
|
delete_release: true
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Fetch artifacts
|
||||||
|
uses: actions/download-artifact@v3.0.1
|
||||||
|
with:
|
||||||
|
path: artifacts/
|
||||||
|
- name: Repackage binaries and allow GitHub to process removed release for few seconds
|
||||||
|
run: |
|
||||||
|
cd artifacts/
|
||||||
|
for i in artifact-* su.xash.Engine.*; do
|
||||||
|
mv "$i"/* .
|
||||||
|
rm -rf "$i"
|
||||||
|
done
|
||||||
|
ls -R .
|
||||||
|
cd ../
|
||||||
|
sleep 20s
|
||||||
|
- name: Upload new release
|
||||||
|
uses: FWGS/action-gh-release@v0.1.15
|
||||||
|
with:
|
||||||
|
name: Xash3D FWGS Continuous ${{ github.ref_name }} Build
|
||||||
|
tag_name: ${{ github.ref_name == 'master' && 'continuous' || format('continuous-{0}', github.ref_name) }}
|
||||||
|
prerelease: true
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
files: artifacts/*
|
||||||
|
draft: false
|
||||||
339
.gitignore
vendored
Normal file
339
.gitignore
vendored
Normal file
@@ -0,0 +1,339 @@
|
|||||||
|
# Binaries
|
||||||
|
*.o
|
||||||
|
*.so
|
||||||
|
*.a
|
||||||
|
*.framework
|
||||||
|
|
||||||
|
# Other
|
||||||
|
*.save
|
||||||
|
|
||||||
|
# Qt Creator for some reason creates *.user.$version files, so exclude it too
|
||||||
|
*.user*
|
||||||
|
*~
|
||||||
|
|
||||||
|
### Xcode ###
|
||||||
|
build/
|
||||||
|
*.pbxuser
|
||||||
|
!default.pbxuser
|
||||||
|
*.mode1v3
|
||||||
|
!default.mode1v3
|
||||||
|
*.mode2v3
|
||||||
|
!default.mode2v3
|
||||||
|
*.perspectivev3
|
||||||
|
!default.perspectivev3
|
||||||
|
xcuserdata
|
||||||
|
*.xccheckout
|
||||||
|
*.moved-aside
|
||||||
|
DerivedData
|
||||||
|
*.xcuserstate
|
||||||
|
|
||||||
|
|
||||||
|
### OSX ###
|
||||||
|
.DS_Store
|
||||||
|
.AppleDouble
|
||||||
|
.LSOverride
|
||||||
|
|
||||||
|
|
||||||
|
# Thumbnails
|
||||||
|
._*
|
||||||
|
|
||||||
|
# Files that might appear on external disk
|
||||||
|
.Spotlight-V100
|
||||||
|
.Trashes
|
||||||
|
|
||||||
|
# Directories potentially created on remote AFP share
|
||||||
|
.AppleDB
|
||||||
|
.AppleDesktop
|
||||||
|
Network Trash Folder
|
||||||
|
Temporary Items
|
||||||
|
.apdisk
|
||||||
|
|
||||||
|
### CMake ###
|
||||||
|
CMakeCache.txt
|
||||||
|
CMakeFiles
|
||||||
|
Makefile
|
||||||
|
cmake_install.cmake
|
||||||
|
install_manifest.txt
|
||||||
|
# makedepend
|
||||||
|
Makefile.dep
|
||||||
|
*.bak
|
||||||
|
ALL_BUILD.*
|
||||||
|
INSTALL.*
|
||||||
|
ZERO_CHECK.*
|
||||||
|
CMakeLists.txt
|
||||||
|
|
||||||
|
# Visual Studio
|
||||||
|
*.obj
|
||||||
|
*.dll
|
||||||
|
*.exp
|
||||||
|
*.lib
|
||||||
|
*.suo
|
||||||
|
*.sdf
|
||||||
|
Debug/
|
||||||
|
Release/
|
||||||
|
ipch/
|
||||||
|
*.opensdf
|
||||||
|
# Use CMake for generating projects
|
||||||
|
*.vcxproj.filters
|
||||||
|
*.vcxproj
|
||||||
|
*.sln
|
||||||
|
|
||||||
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
|
||||||
|
# User-specific files
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
*.userosscache
|
||||||
|
*.sln.docstates
|
||||||
|
|
||||||
|
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||||
|
*.userprefs
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
[Dd]ebug/
|
||||||
|
[Dd]ebugPublic/
|
||||||
|
[Rr]elease/
|
||||||
|
[Rr]eleases/
|
||||||
|
x64/
|
||||||
|
x86/
|
||||||
|
build/
|
||||||
|
bld/
|
||||||
|
[Bb]in/
|
||||||
|
[Oo]bj/
|
||||||
|
|
||||||
|
# Visual Studio 2015 cache/options directory
|
||||||
|
.vs/
|
||||||
|
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||||
|
#wwwroot/
|
||||||
|
|
||||||
|
# MSTest test Results
|
||||||
|
[Tt]est[Rr]esult*/
|
||||||
|
[Bb]uild[Ll]og.*
|
||||||
|
|
||||||
|
# NUNIT
|
||||||
|
*.VisualState.xml
|
||||||
|
TestResult.xml
|
||||||
|
|
||||||
|
# Build Results of an ATL Project
|
||||||
|
[Dd]ebugPS/
|
||||||
|
[Rr]eleasePS/
|
||||||
|
dlldata.c
|
||||||
|
|
||||||
|
# DNX
|
||||||
|
project.lock.json
|
||||||
|
artifacts/
|
||||||
|
|
||||||
|
*_i.c
|
||||||
|
*_p.c
|
||||||
|
*_i.h
|
||||||
|
*.ilk
|
||||||
|
*.meta
|
||||||
|
*.obj
|
||||||
|
*.pch
|
||||||
|
*.pdb
|
||||||
|
*.pgc
|
||||||
|
*.pgd
|
||||||
|
*.rsp
|
||||||
|
*.sbr
|
||||||
|
*.tlb
|
||||||
|
*.tli
|
||||||
|
*.tlh
|
||||||
|
*.tmp
|
||||||
|
*.tmp_proj
|
||||||
|
*.log
|
||||||
|
*.vspscc
|
||||||
|
*.vssscc
|
||||||
|
.builds
|
||||||
|
*.pidb
|
||||||
|
*.svclog
|
||||||
|
*.scc
|
||||||
|
|
||||||
|
# Chutzpah Test files
|
||||||
|
_Chutzpah*
|
||||||
|
|
||||||
|
# Visual C++ cache files
|
||||||
|
ipch/
|
||||||
|
*.aps
|
||||||
|
*.ncb
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
*.cachefile
|
||||||
|
|
||||||
|
# Visual Studio profiler
|
||||||
|
*.psess
|
||||||
|
*.vsp
|
||||||
|
*.vspx
|
||||||
|
*.sap
|
||||||
|
|
||||||
|
# TFS 2012 Local Workspace
|
||||||
|
$tf/
|
||||||
|
|
||||||
|
# Guidance Automation Toolkit
|
||||||
|
*.gpState
|
||||||
|
|
||||||
|
# ReSharper is a .NET coding add-in
|
||||||
|
_ReSharper*/
|
||||||
|
*.[Rr]e[Ss]harper
|
||||||
|
*.DotSettings.user
|
||||||
|
|
||||||
|
# JustCode is a .NET coding add-in
|
||||||
|
.JustCode
|
||||||
|
|
||||||
|
# TeamCity is a build add-in
|
||||||
|
_TeamCity*
|
||||||
|
|
||||||
|
# DotCover is a Code Coverage Tool
|
||||||
|
*.dotCover
|
||||||
|
|
||||||
|
# NCrunch
|
||||||
|
_NCrunch_*
|
||||||
|
.*crunch*.local.xml
|
||||||
|
nCrunchTemp_*
|
||||||
|
|
||||||
|
# MightyMoose
|
||||||
|
*.mm.*
|
||||||
|
AutoTest.Net/
|
||||||
|
|
||||||
|
# Web workbench (sass)
|
||||||
|
.sass-cache/
|
||||||
|
|
||||||
|
# Installshield output folder
|
||||||
|
[Ee]xpress/
|
||||||
|
|
||||||
|
# DocProject is a documentation generator add-in
|
||||||
|
DocProject/buildhelp/
|
||||||
|
DocProject/Help/*.HxT
|
||||||
|
DocProject/Help/*.HxC
|
||||||
|
DocProject/Help/*.hhc
|
||||||
|
DocProject/Help/*.hhk
|
||||||
|
DocProject/Help/*.hhp
|
||||||
|
DocProject/Help/Html2
|
||||||
|
DocProject/Help/html
|
||||||
|
|
||||||
|
# Click-Once directory
|
||||||
|
publish/
|
||||||
|
|
||||||
|
# Publish Web Output
|
||||||
|
*.[Pp]ublish.xml
|
||||||
|
*.azurePubxml
|
||||||
|
# TODO: Comment the next line if you want to checkin your web deploy settings
|
||||||
|
# but database connection strings (with potential passwords) will be unencrypted
|
||||||
|
*.pubxml
|
||||||
|
*.publishproj
|
||||||
|
|
||||||
|
# NuGet Packages
|
||||||
|
*.nupkg
|
||||||
|
# The packages folder can be ignored because of Package Restore
|
||||||
|
**/packages/*
|
||||||
|
# except build/, which is used as an MSBuild target.
|
||||||
|
!**/packages/build/
|
||||||
|
# Uncomment if necessary however generally it will be regenerated when needed
|
||||||
|
#!**/packages/repositories.config
|
||||||
|
|
||||||
|
# Windows Azure Build Output
|
||||||
|
csx/
|
||||||
|
*.build.csdef
|
||||||
|
|
||||||
|
# Windows Store app package directory
|
||||||
|
AppPackages/
|
||||||
|
|
||||||
|
# Visual Studio cache files
|
||||||
|
# files ending in .cache can be ignored
|
||||||
|
*.[Cc]ache
|
||||||
|
# but keep track of directories ending in .cache
|
||||||
|
!*.[Cc]ache/
|
||||||
|
|
||||||
|
# Others
|
||||||
|
ClientBin/
|
||||||
|
[Ss]tyle[Cc]op.*
|
||||||
|
~$*
|
||||||
|
*~
|
||||||
|
*.dbmdl
|
||||||
|
*.dbproj.schemaview
|
||||||
|
*.pfx
|
||||||
|
*.publishsettings
|
||||||
|
node_modules/
|
||||||
|
orleans.codegen.cs
|
||||||
|
|
||||||
|
# RIA/Silverlight projects
|
||||||
|
Generated_Code/
|
||||||
|
|
||||||
|
# Backup & report files from converting an old project file
|
||||||
|
# to a newer Visual Studio version. Backup files are not needed,
|
||||||
|
# because we have git ;-)
|
||||||
|
_UpgradeReport_Files/
|
||||||
|
Backup*/
|
||||||
|
UpgradeLog*.XML
|
||||||
|
UpgradeLog*.htm
|
||||||
|
|
||||||
|
# SQL Server files
|
||||||
|
*.mdf
|
||||||
|
*.ldf
|
||||||
|
|
||||||
|
# Business Intelligence projects
|
||||||
|
*.rdl.data
|
||||||
|
*.bim.layout
|
||||||
|
*.bim_*.settings
|
||||||
|
|
||||||
|
# Microsoft Fakes
|
||||||
|
FakesAssemblies/
|
||||||
|
|
||||||
|
# Node.js Tools for Visual Studio
|
||||||
|
.ntvs_analysis.dat
|
||||||
|
|
||||||
|
# Visual Studio 6 build log
|
||||||
|
*.plg
|
||||||
|
|
||||||
|
# Visual Studio 6 workspace options file
|
||||||
|
*.opt
|
||||||
|
|
||||||
|
# Visual Studio LightSwitch build output
|
||||||
|
**/*.HTMLClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/ModelManifest.xml
|
||||||
|
**/*.Server/GeneratedArtifacts
|
||||||
|
**/*.Server/ModelManifest.xml
|
||||||
|
_Pvt_Extensions
|
||||||
|
|
||||||
|
# PVS Studio for Linux output
|
||||||
|
*.cl.cfg
|
||||||
|
|
||||||
|
# Kate
|
||||||
|
*.kate-swp
|
||||||
|
*.swp
|
||||||
|
|
||||||
|
# QtCreator
|
||||||
|
build-*
|
||||||
|
|
||||||
|
# Android
|
||||||
|
*.apk
|
||||||
|
*.config
|
||||||
|
*.creator
|
||||||
|
*.includes
|
||||||
|
*.files
|
||||||
|
|
||||||
|
# Waf
|
||||||
|
build_current
|
||||||
|
*waf-*/
|
||||||
|
*waf3-*/
|
||||||
|
.lock-waf*
|
||||||
|
*.lastbuildstate
|
||||||
|
*.unsuccessfulbuild
|
||||||
|
__pycache__
|
||||||
|
*.pyc
|
||||||
|
|
||||||
|
# MSVC projects
|
||||||
|
*.vcproj
|
||||||
|
*.sln
|
||||||
|
*.vcxproj
|
||||||
|
|
||||||
|
# Visual Studio Code
|
||||||
|
.vscode/*
|
||||||
|
*.code-workspace
|
||||||
|
.history/*
|
||||||
|
.cache/*
|
||||||
|
enc_temp_folder/
|
||||||
|
|
||||||
|
# KDevelop4
|
||||||
|
*.kdev4
|
||||||
21
.gitmodules
vendored
Normal file
21
.gitmodules
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
[submodule "mainui"]
|
||||||
|
path = 3rdparty/mainui
|
||||||
|
url = https://github.com/FWGS/mainui_cpp
|
||||||
|
[submodule "ref_gl/nanogl"]
|
||||||
|
path = 3rdparty/nanogl
|
||||||
|
url = https://github.com/FWGS/nanogl
|
||||||
|
[submodule "ref_gl/gl-wes-v2"]
|
||||||
|
path = 3rdparty/gl-wes-v2
|
||||||
|
url = https://github.com/FWGS/gl-wes-v2
|
||||||
|
[submodule "ref_gl/gl4es"]
|
||||||
|
path = 3rdparty/gl4es/gl4es
|
||||||
|
url = https://github.com/ptitSeb/gl4es
|
||||||
|
[submodule "vgui_support"]
|
||||||
|
path = 3rdparty/vgui_support
|
||||||
|
url = https://github.com/FWGS/vgui_support
|
||||||
|
[submodule "opus"]
|
||||||
|
path = 3rdparty/opus/opus
|
||||||
|
url = https://github.com/xiph/opus
|
||||||
|
[submodule "3rdparty/xash-extras"]
|
||||||
|
path = 3rdparty/extras/xash-extras
|
||||||
|
url = https://github.com/FWGS/xash-extras
|
||||||
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 853f633be1
1
3rdparty/gl-wes-v2
vendored
Submodule
1
3rdparty/gl-wes-v2
vendored
Submodule
Submodule 3rdparty/gl-wes-v2 added at 2d9b5afe10
1
3rdparty/gl4es/gl4es
vendored
Submodule
1
3rdparty/gl4es/gl4es
vendored
Submodule
Submodule 3rdparty/gl4es/gl4es added at 5226f5f937
24
3rdparty/gl4es/wscript
vendored
Normal file
24
3rdparty/gl4es/wscript
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# encoding: utf-8
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
def options(opt):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def configure(conf):
|
||||||
|
if not conf.path.find_dir('gl4es') or not conf.path.find_dir('gl4es/src'):
|
||||||
|
conf.fatal('Can\'t find gl4es submodule. Run `git submodule update --init --recursive`.')
|
||||||
|
return
|
||||||
|
|
||||||
|
def build(bld):
|
||||||
|
gl4es_srcdir = bld.path.find_node('gl4es/src')
|
||||||
|
|
||||||
|
bld.stlib(source = gl4es_srcdir.ant_glob(['gl/*.c', 'gl/*/*.c', 'glx/hardext.c']),
|
||||||
|
target = 'gl4es',
|
||||||
|
features = 'c',
|
||||||
|
includes = ['gl4es/src', 'gl4es/src/gl', 'gl4es/src/glx', 'gl4es/include'],
|
||||||
|
defines = ['NOX11', 'NO_GBM', 'NO_INIT_CONSTRUCTOR', 'DEFAULT_ES=2', 'NOEGL', 'NO_LOADER', 'STATICLIB'],
|
||||||
|
cflags = ['-w', '-fvisibility=hidden', '-std=gnu99'],
|
||||||
|
subsystem = bld.env.MSVC_SUBSYSTEM,
|
||||||
|
export_includes = '.')
|
||||||
1
3rdparty/mainui
vendored
Submodule
1
3rdparty/mainui
vendored
Submodule
Submodule 3rdparty/mainui added at 46d05f9ff5
1
3rdparty/nanogl
vendored
Submodule
1
3rdparty/nanogl
vendored
Submodule
Submodule 3rdparty/nanogl added at 76393a8fde
1
3rdparty/opus/opus
vendored
Submodule
1
3rdparty/opus/opus
vendored
Submodule
Submodule 3rdparty/opus/opus added at 8cf872a186
40
3rdparty/opus/wscript
vendored
Normal file
40
3rdparty/opus/wscript
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# encoding: utf-8
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
def options(opt):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def configure(conf):
|
||||||
|
if not conf.path.find_dir('opus') or not conf.path.find_dir('opus/src'):
|
||||||
|
conf.fatal('Can\'t find opus submodule. Run `git submodule update --init --recursive`.')
|
||||||
|
return
|
||||||
|
|
||||||
|
# TODO: ARM/x86 intrinsics detection
|
||||||
|
# TODO: maybe call autotools/cmake/meson instead?
|
||||||
|
|
||||||
|
def build(bld):
|
||||||
|
sources = bld.path.ant_glob([
|
||||||
|
'opus/src/*.c',
|
||||||
|
'opus/celt/*.c',
|
||||||
|
'opus/silk/*.c',
|
||||||
|
'opus/silk/float/*.c'
|
||||||
|
], excl = [
|
||||||
|
'opus/src/repacketizer_demo.c',
|
||||||
|
'opus/src/opus_demo.c',
|
||||||
|
'opus/src/opus_compare.c',
|
||||||
|
'opus/celt/opus_custom_demo.c'
|
||||||
|
])
|
||||||
|
includes = ['opus/include/', 'opus/celt/', 'opus/silk/', 'opus/silk/float/']
|
||||||
|
defines = ['USE_ALLOCA', 'OPUS_BUILD', 'FLOAT_APPROX', 'PACKAGE_VERSION="1.3.1"', 'CUSTOM_MODES']
|
||||||
|
|
||||||
|
bld.stlib(
|
||||||
|
source = sources,
|
||||||
|
target = 'opus',
|
||||||
|
features = 'c',
|
||||||
|
includes = includes,
|
||||||
|
defines = defines,
|
||||||
|
subsystem = bld.env.MSVC_SUBSYSTEM,
|
||||||
|
export_includes = ['opus/include/']
|
||||||
|
)
|
||||||
1
3rdparty/vgui_support
vendored
Submodule
1
3rdparty/vgui_support
vendored
Submodule
Submodule 3rdparty/vgui_support added at a2a7b9073f
47
CONTRIBUTING.md
Normal file
47
CONTRIBUTING.md
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
## If you are reporting bugs
|
||||||
|
|
||||||
|
1. Check you are using latest version. You can build latest Xash3D FWGS for yourself, look to README.md.
|
||||||
|
2. Check open issues is your bug is already reported and closed issues if it reported and fixed. Don't send bug if it's already reported.
|
||||||
|
3. Re-run engine with `-dev 2 -log` arguments, reproduce bug and post engine.log which can be found in your working directory.
|
||||||
|
3. Describe steps to reproduce bug.
|
||||||
|
4. Describe which OS and architecture you are using.
|
||||||
|
6. Attach screenshot if it will help clarify the situation.
|
||||||
|
|
||||||
|
## If you are contributing code
|
||||||
|
|
||||||
|
### Which branch?
|
||||||
|
|
||||||
|
* We recommend using `master` branch.
|
||||||
|
|
||||||
|
### Third-party libraries
|
||||||
|
|
||||||
|
* Philosophy of any Xash Project by Uncle Mike: don't be bloated. We follow it too.
|
||||||
|
* Adding new library is allowed only if there is a REAL reason to use it. It's will be nice, if you will leave a possibility to remove new dependency at build-time.
|
||||||
|
* Adding new dependencies for Waf Build System is not welcomed.
|
||||||
|
|
||||||
|
### Portability level
|
||||||
|
|
||||||
|
* Xash3D have it's own crt library. It's recommended to use it. It most cases it's just a wrappers around standart C library.
|
||||||
|
* If your feature need platform-specific code, move it to `engine/platform` and try to implement to every supported OS and every supported compiler or at least leave a stubs.
|
||||||
|
* You must put it under appopriate macro. It's a rule: Xash3D FWGS must compile everywhere. For list of platforms we support, refer to public/build.h file.
|
||||||
|
|
||||||
|
### Code style
|
||||||
|
|
||||||
|
* This project uses mixed Quake's and HLSDK's C/C++ code style convention.
|
||||||
|
* In short:
|
||||||
|
* Use spaces in parenthesis.
|
||||||
|
* Only tabs for indentation.
|
||||||
|
* Any brace must have it's own line.
|
||||||
|
* Short blocks, if statements and loops on single line are allowed.
|
||||||
|
* Avoid magic numbers.
|
||||||
|
* While macros are powerful, it's better to avoid overusing them.
|
||||||
|
* If you unsure, try to mimic code style from anywhere else of engine source code.
|
||||||
|
* **ANY** commit message should start from declaring a tags, in format:
|
||||||
|
|
||||||
|
`tag: added some bugs`
|
||||||
|
|
||||||
|
`tag: subtag: fixed some features`
|
||||||
|
|
||||||
|
Tags can be any: subsystem, simple feature name or even just a filename, without extension.
|
||||||
|
Just keep them always same, it helps keep history clean and commit messages short.
|
||||||
|
|
||||||
17
Documentation/bug-compatibility.md
Normal file
17
Documentation/bug-compatibility.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# Bug-compatibility in Xash3D FWGS
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
At this time, we only have implemented GoldSrc bug-compatibility. It can be enabled with `-bugcomp` command line switch.
|
||||||
|
|
||||||
|
## GoldSrc bug-compatibility
|
||||||
|
|
||||||
|
### Emulated bugs
|
||||||
|
|
||||||
|
* `pfnPEntityOfEntIndex` in GoldSrc returns NULL for last player due to incorrect player index comparison
|
||||||
|
|
||||||
|
### Games and mods that require this
|
||||||
|
|
||||||
|
* 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`
|
||||||
71
Documentation/engine-porting-guide.md
Normal file
71
Documentation/engine-porting-guide.md
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
## Abstract
|
||||||
|
|
||||||
|
Before start, I would recommend you to compile and run engine for already supported and well-spread platform, such as GNU/Linux or Windows. Hack it, get familiar with engine.
|
||||||
|
|
||||||
|
One beauties of Xash3D FWGS Engine is it modularity, so game logic, UI and renderers are located in platform-independent libraries. Every library is loaded at run time and may or may be not optional. For example, if your platform doesn't have OpenGL of any kind, you can skip it and use our software renderer! Of course, there is no real reason to run game engine, if you don't have game logic of any kind, so the minimal build of Xash3D FWGS is headless dedicated server.
|
||||||
|
|
||||||
|
Historically, Xash3D Engine was even more modular(see github.com/a1batross/Xash3D_ancient), but we thought that to fulfill our crossplatform needs we will keep all platform-specific stuff in the engine itself and libraries must import or expose platform-independent APIs.
|
||||||
|
|
||||||
|
Ok, get to the point!
|
||||||
|
|
||||||
|
## Porting guidelines
|
||||||
|
|
||||||
|
It will not be a complete tutorial as covering everything in one article is probably just impossible. Instead, I will give you hints on how engine can be ported, how to get your port to upstreamed and how you should maintain your port.
|
||||||
|
|
||||||
|
0) Get to know your platform. Maybe I asked for this lately, but you MUST KNOW YOUR PLATFORM, i.e. what's this capable of.
|
||||||
|
|
||||||
|
The one of unsupported configurations at this time is when platform can't load dynamic libraries(`*.so` or DLLs). We can't help you as supporting full-static ports are violating the GPL license in various ways.
|
||||||
|
|
||||||
|
The other yet unsupported configuration is the big endian.
|
||||||
|
|
||||||
|
1) Setup toolchain. For dirty port, you can write Makefile for yourself, engine is written that way, so **it doesn't relies** on any generated data or any special processing. But I recommend you to use Waf anyway, it's better integrated to engine and self-documentable. Also, I will cover only our Waf build options.
|
||||||
|
|
||||||
|
2) Open `public/build.h` file. Add appropriate checks for your operating system and/or CPU architecture. It shouldn't be hard.
|
||||||
|
|
||||||
|
Also, you'll need to build [Half-Life SDK](https://github.com/FWGS/hlsdk-xash3d/). It has same `public/build.h` so reflect changes into it. Note that to be compatible with HLSDK proprietary license, it's relicensed as public domain under [Unlicense](https://unlicense.org).
|
||||||
|
|
||||||
|
We have a library naming scheme that allows us and game creators to distribute binaries for different platforms in one archive. Read `Documentation/extensions/library-naming.md` for more information.
|
||||||
|
|
||||||
|
In short, you need to call your platform in unique way. For engine side it's done in `engine/common/build.c` file in engine source code, for HLSDK side it's done in `cmake/LibraryNaming.cmake` and `scripts/waifulib/library-naming.py` files in HLSDK source code.
|
||||||
|
|
||||||
|
You can use [predef project wiki](https://sourceforge.net/p/predef/wiki/Home/) for reference.
|
||||||
|
|
||||||
|
2) Look at the `engine/platform` directory. We usually try to have all platform-specific stuff inside this folder.
|
||||||
|
|
||||||
|
* Functions that must be available on your platform are declared in `platform.h` header. Most of them aren't used in headless dedicated build, but I will cover that later.
|
||||||
|
|
||||||
|
* The POSIX-compliant(for *nix operating systems) goes into `posix` subdirectory.
|
||||||
|
|
||||||
|
* The SDL-specific code goes into `sdl` subdirectory. Note that even I said before that platform-specific code is in `platform` directory, SDL obviously isn't a __platform__, so you can met checks for XASH_SDL inside whole engine, usually in input.
|
||||||
|
|
||||||
|
* Custom SWAP implementation for *nix-based systems is in `swap` subdirectory. It's used when hardware may not have enough memory and you can't add swap memory. I will cover that later
|
||||||
|
It relies on a fact that systems with paged memory will load pages into RAM and move unused to mmap()-ed by custom swap area.
|
||||||
|
That allowed to run game engine on music player with MIPS CPU, Linux without SWAP support and
|
||||||
|
|
||||||
|
* Other folders as `win32`, `android`, `linux` and so on are self-descriptive.
|
||||||
|
|
||||||
|
3) As proof of concept, you can try to test that network features and dynamic library loading are implemented correctly. Build a dedicated server with XASH_DEDICATED or `--dedicated` passed to `waf configure`.
|
||||||
|
|
||||||
|
Start a server and try to connect to it from PC. If everything is fine, then you can move to next step.
|
||||||
|
|
||||||
|
If you get out of memory issues, you can try Low Memory Mode, it's enabled with `--low-memory-mode=N` passed to `waf configure` where N is 1 or 2. Low Memory Mode 1 means that we will NOT break a network compatibility. 2 is deeper and doesn't guarantee protocol compatibility and available multiplayer. Of course, with Low Memory Mode 2 you can't test your port dedicated server.
|
||||||
|
|
||||||
|
If you got anything compiling, it's nice time to make a commit. Commit your changes into git and push them somewhere(GitHub, GitLab or what you prefer), so you will not lose them accidentally.
|
||||||
|
|
||||||
|
4) Here is most interesting, building the client part.
|
||||||
|
|
||||||
|
There are three possible situations for you, by increasing difficulty.
|
||||||
|
|
||||||
|
1. Do you have SDL2 for your platform? If yes, go ahead and compile engine with client part enabled.
|
||||||
|
|
||||||
|
2. Do you have SDL1.2 for your platform? If yes, try to compile it, but SDL1.2 support is very limited and not tested well.
|
||||||
|
|
||||||
|
3. You don't have SDL and you can't port it for some reason by yourself or SDL port just don't stable for your platform? Then you need to implement an engine backend.
|
||||||
|
|
||||||
|
How to implement engine backend? Well, we have a backends system that was introduced in Old Engine. It's simply two files: backends.h and defaults.h in `common` folder in repository root. You will need to add a macros for your backends in `backends.h` and define a logic in `defaults.h`. We have already have some, check them out, as they may be handy for you.
|
||||||
|
|
||||||
|
Once you did it, go back to `platform` directory and open `platform.h` headers. Create new subdirectory in `platform` folder and start implementing missing platform-specific backends one by one. I can't explain this as for obvious reasons it's too specific. You can use macros you defined before in `build.h` to check that you're compiling for your platform and `backends.h` macros to check if platform-specific backend must be enabled.
|
||||||
|
|
||||||
|
As you finished, compile engine, fix errors and commit your changes and push to repository.
|
||||||
|
|
||||||
|
Remember, if something doesn't work and you can't figure out why, you can join our Discord server at discord.me/fwgs. Ping me (@a1batross) or other engine developer and attach link to your repository, so we can discuss and help you in porting.
|
||||||
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
|
||||||
68
Documentation/extensions/console-scripting.md
Normal file
68
Documentation/extensions/console-scripting.md
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
## Console variables
|
||||||
|
|
||||||
|
Console variables (or CVars) are present in all quake-based games.
|
||||||
|
|
||||||
|
By default, it is settings, created by engine, server or client libraries.
|
||||||
|
|
||||||
|
But you can use `set` command to define variables even if they are not created by the engine.
|
||||||
|
|
||||||
|
For example, you can set cvar before it is registered in code.
|
||||||
|
|
||||||
|
`set defaultmap crossfire`
|
||||||
|
|
||||||
|
This works even in server.cfg before server cvars initialization and the engine will reuse its value on cvar creation
|
||||||
|
|
||||||
|
## Aliases
|
||||||
|
|
||||||
|
An alias allows to define new commands.
|
||||||
|
|
||||||
|
`alias wnext "invnext;wait;wait;+attack;wait;-attack"`
|
||||||
|
|
||||||
|
You can hook any command by adding an alias to it and unaliasing it, when you want to use original command.
|
||||||
|
|
||||||
|
```
|
||||||
|
alias invnext1 "unalias invnext;wnext;alias invnext invnext1"
|
||||||
|
alias invnext invnext1
|
||||||
|
```
|
||||||
|
|
||||||
|
## Scripting extensions
|
||||||
|
|
||||||
|
This is an extensions of Xash3D FWGS(merged to original Xash3D since build 3887), that can be enabled by cmd_scripting cvar.
|
||||||
|
|
||||||
|
Enabling scripting: `cmd_scripting 1`
|
||||||
|
|
||||||
|
This is an archive cvar and it will be saved.
|
||||||
|
|
||||||
|
### CVar substitution
|
||||||
|
|
||||||
|
You can substitute cvar value to any command by adding \$ symbol:
|
||||||
|
|
||||||
|
`echo $sv_cheats`
|
||||||
|
|
||||||
|
### Condition checking
|
||||||
|
|
||||||
|
Allows checking cvar values.
|
||||||
|
|
||||||
|
```
|
||||||
|
if <value1> <operator> <value2>
|
||||||
|
:<action1>
|
||||||
|
:if <value3>
|
||||||
|
::<action2>
|
||||||
|
:<action3>
|
||||||
|
else
|
||||||
|
:<action4>
|
||||||
|
```
|
||||||
|
|
||||||
|
* Values are any string or numeric values (for example, substituted cvars).
|
||||||
|
* Operator is = (or ==), \!=, \<, \>, \<=, \>=. == is same to =.
|
||||||
|
* If single value specified, condition is true when value is non-zero
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```
|
||||||
|
if $sv_cheats == 1
|
||||||
|
:echo Cheats enabled, adding cheat menu
|
||||||
|
:exec cheatmenu.cfg
|
||||||
|
else
|
||||||
|
:echo Please enable cheats to use this!
|
||||||
|
```
|
||||||
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 |
|
||||||
48
Documentation/extensions/input-interface-ru.md
Normal file
48
Documentation/extensions/input-interface-ru.md
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
## Цель
|
||||||
|
|
||||||
|
На текущий момент клиенты имеют некоторые части платформозависимого кода внутри себя. Это плохо, т.к. мы не можем использовать одинаковые функции (если не перепишем почти половину кода SDL) на разных платформах.
|
||||||
|
|
||||||
|
## Клиентская часть
|
||||||
|
|
||||||
|
* Клиент будет иметь возможность полностью реализовать touch-ввод. Отрисовка может быть произведена через HUD.
|
||||||
|
* Клиент получит простые события движения и обзора от движка
|
||||||
|
|
||||||
|
### Клиентская реализация
|
||||||
|
|
||||||
|
#### Клиент будет экспортировать некоторые функции движку (опционально):
|
||||||
|
|
||||||
|
* `int IN_ClientTouchEvent ( int fingerID, float x, float y, float dx, float dy );`
|
||||||
|
|
||||||
|
Вернёт 1 если касание активно, иначе 0.
|
||||||
|
|
||||||
|
* `void IN_ClientMoveEvent ( float forwardmove, float sidemove );`
|
||||||
|
|
||||||
|
Клиент будет накапливать значения величин для команд движения перед созданием команд и очищать их при CreateMove.
|
||||||
|
|
||||||
|
* `void IN_ClientLookEvent ( float relyaw, float relpitch );`
|
||||||
|
|
||||||
|
Клиент будет вращать камерой когда нужно, прямо как в реализации мыши
|
||||||
|
|
||||||
|
## Движковая часть
|
||||||
|
|
||||||
|
* Движок будет управлять событиями платформы и вызывать клиентские функции
|
||||||
|
* Движок реализует стандартную систему взгляда и движения если её нет в клиенте
|
||||||
|
|
||||||
|
### Движковая реализация
|
||||||
|
|
||||||
|
#### События касания
|
||||||
|
|
||||||
|
Перед вызовом ClientMove движок обязан получить события о касании.
|
||||||
|
|
||||||
|
Если из клиента экспортирована функция IN_ClientTouchEvent, событие будет отправлено клиенту.
|
||||||
|
|
||||||
|
Иначе, движок будет рисовать свой touch-интерфейс.
|
||||||
|
|
||||||
|
#### Другие события
|
||||||
|
|
||||||
|
Интерфейс прикосновений и код джойстика в движке будут генерировать следующие два типа событий:
|
||||||
|
* События движения (функция IN_ClientMoveEvent)
|
||||||
|
* События просмотра (функция IN_ClientLookEvent)
|
||||||
|
|
||||||
|
Если клиент экспортирует эти функции, события будут отправляться клиенту перед CreateMove
|
||||||
|
Иначе события просмотра будут происходить перед CreateMove, но после MoveEvent. Они будут применены к генерируемым командам
|
||||||
48
Documentation/extensions/input-interface.md
Normal file
48
Documentation/extensions/input-interface.md
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
## Purpose
|
||||||
|
|
||||||
|
Clients have different platform-depended input code now.
|
||||||
|
It is bad because we cannot use same functions (if we won't rewrite almost half of SDL) on different platforms.
|
||||||
|
|
||||||
|
## Client part
|
||||||
|
|
||||||
|
* Client will have ability to fully implement touch input. Drawing may be done by HUD.
|
||||||
|
* Client will receive basic motion and look events from engine
|
||||||
|
|
||||||
|
### Client implementation
|
||||||
|
|
||||||
|
#### Client will optionally export some functions to Engine:
|
||||||
|
* `int IN_ClientTouchEvent ( int fingerID, float x, float y, float dx, float dy );`
|
||||||
|
|
||||||
|
Return 1 if touch is active, 0 otherwise.
|
||||||
|
|
||||||
|
* `void IN_ClientMoveEvent ( float forwardmove, float sidemove );`
|
||||||
|
|
||||||
|
Client wil accumulate move values before creating commands and flush it on CreateMove.
|
||||||
|
|
||||||
|
* `void IN_ClientLookEvent ( float relyaw, float relpitch );`
|
||||||
|
|
||||||
|
Client will rotate camera when needed as in mouse implementation
|
||||||
|
|
||||||
|
## Engine part
|
||||||
|
|
||||||
|
* Engine will handle platform events and call client functions.
|
||||||
|
* Engine will implement fallback look and movement system when client interface not present
|
||||||
|
|
||||||
|
### Engine implementation
|
||||||
|
|
||||||
|
#### Touch events
|
||||||
|
|
||||||
|
Before calling ClientMove engine must get touch events.
|
||||||
|
|
||||||
|
If client exported IN_ClientTouchEvent, event will be sent to client.
|
||||||
|
|
||||||
|
Otherwise engine will draw own touch interface.
|
||||||
|
|
||||||
|
#### Other events
|
||||||
|
|
||||||
|
Engine touch interface and joystick support code will generate two types of events:
|
||||||
|
* Move events (IN_ClientMoveEvent function)
|
||||||
|
* Look events (IN_ClientLookEvent function)
|
||||||
|
|
||||||
|
If client exported these functions, events will be sent to client before CreateMove
|
||||||
|
Otherwise Look Event will be processed before CreateMove, but MoveEvent after. It will be applied to generated command
|
||||||
44
Documentation/extensions/library-naming.md
Normal file
44
Documentation/extensions/library-naming.md
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
I propose a new library naming scheme, which will allow to distribute mods and games in single archive to different operating systems and CPUs:
|
||||||
|
|
||||||
|
Legend:
|
||||||
|
* $os -- Q_buildos() return value, in lower case.
|
||||||
|
* $arch -- Q_buildarch() return value, in lower case.
|
||||||
|
* $ext -- OS-specific extension: dll, so, dylib, etc.
|
||||||
|
|
||||||
|
The scheme will be:
|
||||||
|
|
||||||
|
1. Client library:
|
||||||
|
* ```client.$ext``` for **Win/Lin/Mac** with **x86**.
|
||||||
|
* ```client_$arch.$ext``` for **Win/Lin/Mac** with **NON-x86**.
|
||||||
|
* ```client_$os_$arch.$ext``` for everything else.
|
||||||
|
|
||||||
|
2. Menu library:
|
||||||
|
* ```menu.$ext``` for **Win/Lin/Mac** with **x86**.
|
||||||
|
* ```menu_$arch.$ext``` for **Win/Lin/Mac** with **NON-x86**.
|
||||||
|
* ```menu_$os_$arch.$ext``` for everything else.
|
||||||
|
|
||||||
|
3. Server library:
|
||||||
|
* On **Win/Lin/Mac** with **x86**, it **MUST** use the raw gamedll name for corresponding OS field from `gameinfo.txt`.
|
||||||
|
* On **Win/Lin/Mac** with **NON-x86**, it **MUST** use the raw gamedll name for corresponding OS field from `gameinfo.txt`, but append ```_$arch``` before file extension. Like: ```hl_amd64.so``` or ```cs_e2k.so```.
|
||||||
|
* On everything else, it must use gamedll name from ```gamedll_linux``` field, but append ```_$os_$arch``` before file extension. Like: ```hl_haiku_amd64.so``` or ```cs_freebsd_armhf.so```.
|
||||||
|
Why ```gamedll_linux``` and not ```gamedll```? Because it looks more logic that way, most operating systems are *nix-like and share code with Linux, rather than Windows.
|
||||||
|
|
||||||
|
4. Refresh library: not needed, as RefAPI is not stable and it's not intended to distribute with mods.
|
||||||
|
|
||||||
|
For any libraries distributed **with** engine, naming scheme should be used more convenient for OS port.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
Issue #1: Build-system integration.\
|
||||||
|
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?\
|
||||||
|
Resolution: Little-endian only, as there is no known big-endian ARM platforms in the wild.
|
||||||
|
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`.
|
||||||
|
|
||||||
|
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
|
||||||
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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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"
|
||||||
|
}
|
||||||
|
```
|
||||||
116
Documentation/gameinfo.md
Normal file
116
Documentation/gameinfo.md
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
# 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 |
|
||||||
|
|
||||||
|
## 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` | |
|
||||||
|
|
||||||
|
|
||||||
110
Documentation/mod-porting-guide.md
Normal file
110
Documentation/mod-porting-guide.md
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
Newer gcc versions have restriction which breaks build.
|
||||||
|
|
||||||
|
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
|
||||||
|
```
|
||||||
|
#define SetThink( a ) m_pfnThink = static_cast <void (CBaseEntity::*)(void)> (&a)
|
||||||
|
#define SetTouch( a ) m_pfnTouch = static_cast <void (CBaseEntity::*)(CBaseEntity *)> (&a)
|
||||||
|
#define SetUse( a ) m_pfnUse = static_cast <void (CBaseEntity::*)( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )> (&a)
|
||||||
|
#define SetBlocked( a ) m_pfnBlocked = static_cast <void (CBaseEntity::*)(CBaseEntity *)> (&a)
|
||||||
|
#define ResetThink( ) m_pfnThink = static_cast <void (CBaseEntity::*)(void)> (NULL)
|
||||||
|
#define ResetTouch( ) m_pfnTouch = static_cast <void (CBaseEntity::*)(CBaseEntity *)> (NULL)
|
||||||
|
#define ResetUse( ) m_pfnUse = static_cast <void (CBaseEntity::*)( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )> (NULL)
|
||||||
|
#define ResetBlocked( ) m_pfnBlocked = static_cast <void (CBaseEntity::*)(CBaseEntity *)> (NULL)
|
||||||
|
...
|
||||||
|
#define SetMoveDone( a ) m_pfnCallWhenMoveDone = static_cast <void (CBaseToggle::*)(void)> (&a)
|
||||||
|
```
|
||||||
|
* 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
|
||||||
|
|
||||||
|
## Porting client-side code
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
* 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-portable port (cl_util.h).
|
||||||
|
* Add ctype.h where is needed (tolower, isspace functions).
|
||||||
|
* Add string.h where is needed (memcpy, strcpy, etc).
|
||||||
|
* Use in_defs.h from hlsdk-portable.
|
||||||
|
* Add input_xash3d.cpp from hlsdk-portable project to fix input.
|
||||||
|
|
||||||
|
Now your client should be able to build and work correctly.
|
||||||
|
|
||||||
|
# Porting mod to hlsdk-portable
|
||||||
|
Look at changes which was made.
|
||||||
|
|
||||||
|
If there are not too much changes (for example, only some weapons was added), add these changes in hlsdk-portable.
|
||||||
|
|
||||||
|
You can use diff with original HLSDK and apply it as patch to hlsdk-portable.
|
||||||
|
|
||||||
|
```
|
||||||
|
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).
|
||||||
|
|
||||||
|
We recommend to enable ignoring space changes in diff.
|
||||||
|
|
||||||
|
Move all new files to separate directories.
|
||||||
|
|
||||||
|
# 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).
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
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.
|
||||||
11
Documentation/not-supported-mod-list-and-reasons-why.md
Normal file
11
Documentation/not-supported-mod-list-and-reasons-why.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Not supported mods and reasons why
|
||||||
|
|
||||||
|
|Name |Version |Why not working |What was made for that
|
||||||
|
|---- |------- |--------------- |----------------------
|
||||||
|
|Blue Shift |The latest steam release |Uses vgui2 library which xash3d does not support |Recreated source code here: https://github.com/FWGS/hlsdk-xash3d/tree/bshift
|
||||||
|
|Counter Strike |1.6(The latest steam release) |Uses vgui2 library which xash3d does not support |Some work on vgui2 support was made here: https://github.com/FWGS/xash3d/tree/vinterface
|
||||||
|
|Counter Strike: Condition Zero |The latest steam release |Uses vgui2 library which xash3d does not support |Some work on vgui2 support was made here: https://github.com/FWGS/xash3d/tree/vinterface
|
||||||
|
|Counter Strike: Condition Zero - Deleted scenes |The latest steam release |Uses vgui2 library which xash3d does not support |Some work on vgui2 support was made here: https://github.com/FWGS/xash3d/tree/vinterface
|
||||||
|
|Day of Defeat |The latest steam release |Uses vgui2 library which xash3d does not support |Some work on vgui2 support was made here: https://github.com/FWGS/xash3d/tree/vinterface
|
||||||
|
|Sven-Coop |5.0+ |Uses custom GoldSrc engine |
|
||||||
|
|
||||||
380
Documentation/opensource-mods.md
Normal file
380
Documentation/opensource-mods.md
Normal file
@@ -0,0 +1,380 @@
|
|||||||
|
Source code of this mods is available for modders and porters in public access.
|
||||||
|
|
||||||
|
# Original Work
|
||||||
|
## Absolute Zero
|
||||||
|
Official gitlab repository - https://gitlab.com/Cobalt-57/half-life-absolute-zero/
|
||||||
|
|
||||||
|
## Adrenaline Gamer
|
||||||
|
Official github repository by Martin \"Bullet\" Webrant - https://github.com/martinwebrant/agmod
|
||||||
|
|
||||||
|
## Arrangement
|
||||||
|
Mirrored on github - https://github.com/JoelTroch/am_src_30jan2011
|
||||||
|
|
||||||
|
## Arrangemode: Rebirth
|
||||||
|
Mirrored on github - https://github.com/JoelTroch/am_src_rebirth
|
||||||
|
|
||||||
|
## Battle Grounds
|
||||||
|
Mirrored on github - https://github.com/nekonomicon/BattleGrounds
|
||||||
|
|
||||||
|
## Bubblemod
|
||||||
|
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
|
||||||
|
|
||||||
|
## Chicken Fortress
|
||||||
|
Official github repository - https://github.com/CKFDevPowered/CKF3Alpha
|
||||||
|
|
||||||
|
## Cold Ice
|
||||||
|
Version 1.9 is available on ModDB - https://www.moddb.com/mods/cold-ice/downloads/cold-ice-sdk
|
||||||
|
|
||||||
|
Version 1.9 mirrored on github - https://github.com/solidi/hl-mods/tree/master/ci
|
||||||
|
|
||||||
|
## Cold Ice Ressurection
|
||||||
|
Mirrored on github - https://github.com/solidi/hl-mods/tree/master/cir
|
||||||
|
|
||||||
|
## Cthulhu
|
||||||
|
Uploaded to github by Oleg Cherkasky - https://github.com/gunrunners-paradise/Cthulhu-HLmod-SDK
|
||||||
|
|
||||||
|
## Deathmatch Classic
|
||||||
|
Available in Valve's Half-Life repository - https://github.com/ValveSoftware/halflife/tree/master/dmc
|
||||||
|
|
||||||
|
## ESHQ
|
||||||
|
Official github repository - https://github.com/adslbarxatov/xash3d-for-ESHQ
|
||||||
|
|
||||||
|
## Flat-Life
|
||||||
|
Available on GamerLab - http://gamer-lab.com/eng/code_mods_goldsrc/Half-Life_2D_(Flat-Life)
|
||||||
|
|
||||||
|
## Gang Wars
|
||||||
|
Mirrored on github - https://github.com/nekonomicon/gw1.45src
|
||||||
|
|
||||||
|
## Go-mod
|
||||||
|
Versions 2.0 and 3.0, available in mod archives on ModDB - https://www.moddb.com/mods/go-mod/downloads
|
||||||
|
|
||||||
|
Version 3.0, mirrored on github - https://github.com/nekonomicon/Go-mod30
|
||||||
|
|
||||||
|
## GT mod
|
||||||
|
Available on GamerLab - http://gamer-lab.com/eng/code_mods_goldsrc/GT_mod_(Polnie_ishodniki)
|
||||||
|
|
||||||
|
## Half-Life: Advanced Deathmatch
|
||||||
|
Mirrored on github - https://github.com/solidi/hl-mods/tree/master/hla
|
||||||
|
|
||||||
|
## Half-Life: Decay
|
||||||
|
Mirrored on github(PC Port) - https://github.com/hoaxer/Half-Life-Decay
|
||||||
|
|
||||||
|
## Half-Life: Echoes
|
||||||
|
Available on ModDB - https://www.moddb.com/mods/half-life-echoes
|
||||||
|
|
||||||
|
## Half-Life: Expanded Arsenal
|
||||||
|
Available on ModDB - https://www.moddb.com/mods/half-life-expanded-arsenal
|
||||||
|
|
||||||
|
## Half-Life: Gravgun mod
|
||||||
|
Branch **gravgun** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/gravgun
|
||||||
|
|
||||||
|
## Half-Life: Invasion
|
||||||
|
Official github repository - https://github.com/jlecorre/hlinvasion
|
||||||
|
|
||||||
|
## Half-Life: Pong
|
||||||
|
Mirrored on github - https://github.com/solidi/hl-mods/tree/master/pong
|
||||||
|
|
||||||
|
## Half-Life: Quest Mode
|
||||||
|
Available on cs-mapping.com.ua - https://old.cs-mapping.com.ua/forum/showthread.php?t=38030
|
||||||
|
|
||||||
|
## Half-Life: Top-Down
|
||||||
|
Official gitlab repository - https://gitlab.com/Sockman/hltopdown
|
||||||
|
|
||||||
|
## Half-Life: Update
|
||||||
|
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
|
||||||
|
Available on ModDB - https://www.moddb.com/mods/half-life-weapon-edition/downloads/half-life-weapon-edition-1508-alpha-open-src
|
||||||
|
|
||||||
|
## Half-Life: Year of the Dragon
|
||||||
|
Available on ModDB - https://www.moddb.com/mods/year-of-the-dragon
|
||||||
|
|
||||||
|
## Half-Nuked
|
||||||
|
Available on ModDB - https://www.moddb.com/mods/half-nuked/downloads/half-nuked-src
|
||||||
|
|
||||||
|
## Half-Payne
|
||||||
|
Official github repository - https://github.com/suXinjke/HalfPayne
|
||||||
|
|
||||||
|
## Half-Quake
|
||||||
|
Official github repository - https://github.com/muddasheep/hqtrilogy
|
||||||
|
|
||||||
|
## Half-Rats: Parasomnia
|
||||||
|
Official github repository - https://github.com/HeathGames/half_rats_parasomnia_src
|
||||||
|
|
||||||
|
## Half-Screwed
|
||||||
|
Official github repository - https://github.com/desukuran/half-screwed
|
||||||
|
|
||||||
|
## Headcrab Frenzy
|
||||||
|
Version 1.3 on ModDB - https://www.moddb.com/mods/headcrab-frenzy/downloads/headcrab-frenzy-13-beta-source-code
|
||||||
|
|
||||||
|
## Heart of Evil
|
||||||
|
Mirrored on github - https://github.com/nekonomicon/HeartOfEvil
|
||||||
|
|
||||||
|
## Ingram Chillin' Mod
|
||||||
|
Official SourceForge repository - https://sourceforge.net/projects/icm-hl/
|
||||||
|
|
||||||
|
## MechMod
|
||||||
|
Official github repository - https://github.com/vermagav/mechmod
|
||||||
|
|
||||||
|
## Mortal Combat Forever
|
||||||
|
Available on GamerLab - http://gamer-lab.com/eng/code_mods_goldsrc/Mortal_Combat_Forever_(Polnie_ishodniki)
|
||||||
|
|
||||||
|
## Natural Selection
|
||||||
|
Official github repository - https://github.com/unknownworlds/NS
|
||||||
|
|
||||||
|
## Overturn
|
||||||
|
Available in mod archive on ModDB - https://www.moddb.com/mods/overturn
|
||||||
|
|
||||||
|
## Oz Deathmatch
|
||||||
|
Mirrored on github - https://github.com/nekonomicon/OZDM
|
||||||
|
|
||||||
|
## Paranoia
|
||||||
|
Available on ModDB - https://www.moddb.com/mods/paranoia/downloads/paranoia-toolkit
|
||||||
|
|
||||||
|
## Paranoia 2: The Savior
|
||||||
|
Prealpha, mirrored on github - https://github.com/a1batross/Paranoia2_ancient
|
||||||
|
|
||||||
|
Version 1.51, mirrored on github - https://github.com/a1batross/Paranoia2_original
|
||||||
|
|
||||||
|
## Raven City
|
||||||
|
*Unfinished mod*
|
||||||
|
|
||||||
|
Was found on HLFX - http://hlfx.ru/forum/showthread.php?s=2c892dfc52f72be52a89c3f52a397cd0&threadid=1819&postid=44674#post44674
|
||||||
|
|
||||||
|
## 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
|
||||||
|
Download page on official site - http://www.thothie.com/ww/
|
||||||
|
|
||||||
|
## XashXT
|
||||||
|
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
|
||||||
|
Available in mod archive on ModDB - https://www.moddb.com/mods/zombie-x-10-final/downloads/zombie-x-10-dle-beta6-last-version
|
||||||
|
|
||||||
|
## ZXC
|
||||||
|
Available on ModDB - https://www.moddb.com/mods/zxc-mod-133/downloads/zxc-mod-136-final
|
||||||
|
|
||||||
|
Mirrored on github - https://github.com/ZXCmod/ZXCmod
|
||||||
|
|
||||||
|
# Reimplementation
|
||||||
|
## Absolute Redemption
|
||||||
|
Branch **redempt** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/redempt
|
||||||
|
|
||||||
|
## Adrenaline Gamer
|
||||||
|
OpenAG by YaLTeR - https://github.com/YaLTeR/OpenAG
|
||||||
|
|
||||||
|
## Afraid of Monsters
|
||||||
|
malortie's recreation - https://github.com/malortie/hl-aom
|
||||||
|
|
||||||
|
Branch **aom** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/aom
|
||||||
|
|
||||||
|
## Afraid of Monsters: Director's cut
|
||||||
|
Reverse-engineered code: branch **aomdc** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/aomdc
|
||||||
|
|
||||||
|
## Azure Sheep
|
||||||
|
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
|
||||||
|
|
||||||
|
## Big Lolly
|
||||||
|
malortie's recreation - https://github.com/malortie/hl-biglolly
|
||||||
|
|
||||||
|
Branch **biglolly** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/biglolly
|
||||||
|
|
||||||
|
## Black Ops
|
||||||
|
malortie's recreation - https://github.com/malortie/hl-blackops
|
||||||
|
|
||||||
|
Branch **blackops** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/blackops
|
||||||
|
|
||||||
|
## Bloody Pizza: Vendetta
|
||||||
|
Branch **caseclosed** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/caseclosed
|
||||||
|
|
||||||
|
## Case Closed
|
||||||
|
Branch **caseclosed** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/caseclosed
|
||||||
|
|
||||||
|
## Cleaner's Adventures
|
||||||
|
Branch **CAd** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/CAd
|
||||||
|
|
||||||
|
## Counter Strike
|
||||||
|
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 s1lentq - https://github.com/s1lentq/ReGameDLL_CS
|
||||||
|
|
||||||
|
## Counter Strike Online
|
||||||
|
CSO-like Xash3D-based mod, CSMoE - https://github.com/MoeMod/CSMoE
|
||||||
|
|
||||||
|
## Crack-Life: Campaign Mode
|
||||||
|
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
|
||||||
|
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
|
||||||
|
|
||||||
|
## 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
|
||||||
|
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
|
||||||
|
|
||||||
|
## Half-Life: Induction
|
||||||
|
Branch **induction** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/induction
|
||||||
|
|
||||||
|
## Half-Life: Opposing Force
|
||||||
|
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
|
||||||
|
|
||||||
|
Spirit of Half Life: Opposing-Force Edition - https://github.com/Hammermaps-DEV/SOHL-V1.9-Opposing-Force-Edition
|
||||||
|
|
||||||
|
## Half-Life: Rebellion
|
||||||
|
Reverse-engineered code: branch **rebellion** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/rebellion
|
||||||
|
|
||||||
|
## Half-Life: Urbicide
|
||||||
|
Branch **hl_urbicide** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/hl_urbicide
|
||||||
|
|
||||||
|
## Half-Life: 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
|
||||||
|
|
||||||
|
## Half-Secret
|
||||||
|
Branch **half-secret** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/half-secret
|
||||||
|
|
||||||
|
## Night at the Office
|
||||||
|
malortie's recreation - https://github.com/malortie/hl-nato
|
||||||
|
|
||||||
|
Branch **noffice** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/noffice
|
||||||
|
|
||||||
|
## Poke 646
|
||||||
|
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
|
||||||
|
|
||||||
|
## Poke 646: 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
|
||||||
|
|
||||||
|
## Residual Life
|
||||||
|
Reverse-engineered code: branch **residual_point** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/residual_point
|
||||||
|
|
||||||
|
## Residual Point
|
||||||
|
Reverse-engineered code: branch **residual_point** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/residual_point
|
||||||
|
|
||||||
|
## Sewer Beta
|
||||||
|
Branch **sewer_beta** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/sewer_beta
|
||||||
|
|
||||||
|
## Team Fortress Classic
|
||||||
|
Reverse-engineered code by Velaron - https://github.com/Velaron/tf15-client
|
||||||
|
|
||||||
|
## The Gate
|
||||||
|
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
|
||||||
|
|
||||||
|
## They Hunger
|
||||||
|
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
|
||||||
|
|
||||||
|
They Hunger: Tactical - https://www.moddb.com/mods/they-hunger-tactical/downloads/tht-source-code-documentation
|
||||||
|
|
||||||
|
## Times of Troubles
|
||||||
|
malortie's recreation - https://github.com/malortie/hl-tot
|
||||||
|
|
||||||
|
Branch **tot** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/tot
|
||||||
|
|
||||||
|
# Derived work
|
||||||
|
## Adrenaline Gamer
|
||||||
|
Branch **aghl** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/aghl
|
||||||
|
|
||||||
|
## Bubblemod
|
||||||
|
Branch **bubblemod** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/bubblemod
|
||||||
|
|
||||||
|
## Deathmatch Classic
|
||||||
|
Deathmatch Classic: Adrenaline Gamer Edition - https://github.com/martinwebrant/agmod/tree/master/src/dmc
|
||||||
|
|
||||||
|
Deathmatch Quaked - https://www.moddb.com/games/deathmatch-classic/downloads/dmq2
|
||||||
|
|
||||||
|
Branch **dmc** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/dmc
|
||||||
|
|
||||||
|
## Half-Life: Echoes
|
||||||
|
Branch **echoes** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/echoes
|
||||||
|
|
||||||
|
## Half-Life: Invasion
|
||||||
|
Port to HLSDK 2.4 by malortie - https://github.com/malortie/hl-invasion
|
||||||
|
|
||||||
|
Port to Linux by fmoraw - https://github.com/fmoraw/hlinvasion
|
||||||
|
|
||||||
|
Branch **invasion** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/invasion
|
||||||
|
|
||||||
|
## Half-Life: Top-Down
|
||||||
|
Branch **hltopdown** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/hltopdown
|
||||||
|
|
||||||
|
## Half-Screwed
|
||||||
|
Branch **half-screwed** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/half-screwed
|
||||||
|
|
||||||
|
## Natural Selection
|
||||||
|
Port to Linux - https://github.com/fmoraw/NS
|
||||||
|
|
||||||
|
## Spirit of Half-Life
|
||||||
|
Version 1.2: branch **sohl1.2** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/sohl1.2
|
||||||
|
|
||||||
|
## Swiss Cheese Halloween 2002
|
||||||
|
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
|
||||||
|
|
||||||
|
## The Wastes
|
||||||
|
Version 1.5: Port to Linux - https://git.mentality.rip/a1batross/halflife-thewastes-sdk
|
||||||
|
|
||||||
|
## Threewave CTF
|
||||||
|
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
|
||||||
|
Branch **zombie-x** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/zombie-x
|
||||||
|
|
||||||
33
Documentation/ports.md
Normal file
33
Documentation/ports.md
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
Xash3D FWGS is intended to be easily ported to specific platform, however main issue is maintaining such ports.
|
||||||
|
|
||||||
|
This page is about merged ports to main source tree and responsible for it developers.
|
||||||
|
|
||||||
|
For porting guidelines, look engine-porting-guide.md.
|
||||||
|
|
||||||
|
Status:
|
||||||
|
* **Supported**: active, was confirmed to be fully functional.
|
||||||
|
* **In progress**: active, under development.
|
||||||
|
* **Old Engine**: port was for old engine fork
|
||||||
|
* **Not maintained**: lack of human resources
|
||||||
|
* **Deprecated**: not supported anymore
|
||||||
|
|
||||||
|
Table is sorted by status and platform.
|
||||||
|
|
||||||
|
| Platform | Status | Maintainer | Note
|
||||||
|
| -------- | ------ | ---------- | ----
|
||||||
|
| Android | Supported | @Velaron |
|
||||||
|
| *BSD | Supported | @nekonomicon |
|
||||||
|
| DOS4GW | Supported | @mittorn |
|
||||||
|
| GNU/Linux | Supported | @a1batross, @mittorn |
|
||||||
|
| Haiku | Supported | not maintained | Was added by #478 and #483
|
||||||
|
| 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)
|
||||||
|
| Wii | In progress | Collaborative effort | [GitHub Repository](https://github.com/saucesaft/xash3d-wii)
|
||||||
|
| Emscripten | Old Engine | not maintained |
|
||||||
|
| 3DS | Old Engine fork | not maintained | [GitHub Repository](https://github.com/masterfeizz/Xash3DS)
|
||||||
|
| Oculus Quest | Old Engine fork | @DrBeef | [GitHub Repository](https://github.com/DrBeef/Lambda1VR)
|
||||||
|
| 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/`.
|
||||||
15
Documentation/public-servers-rules-and-recommendations.md
Normal file
15
Documentation/public-servers-rules-and-recommendations.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
As online community is growing, we don't want to keep bad or invalid servers on the Internet Games list. It's a common rules for all Xash3D server owners who are using default master server.
|
||||||
|
|
||||||
|
1. Breaking master server or clients is prohibited in any way. If you found a serious bug, contact us at contact 'at' fwgs.ru or post an issue at GitHub.
|
||||||
|
|
||||||
|
2. Changing settings, exploiting vulnerabilities of clients is prohibited in any way. If you found a serious bug, contact us at contact 'at' fwgs.ru or post an issue at GitHub.
|
||||||
|
|
||||||
|
2. Agressive advertisement and spam on other servers is prohibited in any way.
|
||||||
|
|
||||||
|
3. If your server is require downloading custom content, it should be available for everyone. Recommended way to deliver custom content is FastDL.
|
||||||
|
|
||||||
|
4. It's recommended to keep your server is up-to-date. You may use our public Debian/Ubuntu/Arch Linux [repository](https://github.com/FWGS/xash3d/wiki/How-to-set-up-a-Xash3D-Dedicated-Server-on-Debian-or-Ubuntu) to simplify updating process.
|
||||||
|
|
||||||
|
Just follow these rules to not get banned on our master server. Good luck, have fun!
|
||||||
|
|
||||||
|
|
||||||
1226
Documentation/supported-mod-list.md
Normal file
1226
Documentation/supported-mod-list.md
Normal file
File diff suppressed because it is too large
Load Diff
92
README.md
Normal file
92
README.md
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
# 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://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)
|
||||||
|
|
||||||
|
Xash3D 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.
|
||||||
|
|
||||||
|
## Donate
|
||||||
|
[](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
|
||||||
|
* Steam Half-Life (HLSDK 2.4) support.
|
||||||
|
* Crossplatform and modern compilers support: supports Windows, Linux, BSD & Android on x86 & ARM and [many more](Documentation/ports.md).
|
||||||
|
* Better multiplayer support: multiple master servers, headless dedicated server, voice chat and IPv6 support.
|
||||||
|
* Multiple renderers support: OpenGL, GLESv1, GLESv2 and Software.
|
||||||
|
* Advanced virtual filesystem: `.pk3` and `.pk3dir` support, compatibility with GoldSrc FS module, fast case-insensitivity emulation for crossplatform.
|
||||||
|
* 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.
|
||||||
|
* External VGUI support module.
|
||||||
|
* PNG & KTX2 image format support.
|
||||||
|
* [A set of small improvements](Documentation/), without broken compatibility.
|
||||||
|
|
||||||
|
## 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.
|
||||||
|
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.
|
||||||
|
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.
|
||||||
|
You still needed to copy `valve` directory as all game resources located there.
|
||||||
|
3) Run the main executable (`xash3d.exe` or AppImage).
|
||||||
|
|
||||||
|
For additional info, run Xash3D with `-help` command line key.
|
||||||
|
|
||||||
|
## 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
|
||||||
|
* Issues are accepted in both English and Russian
|
||||||
|
* Before sending a PR, check if you followed our contribution guide in CONTRIBUTING.md file.
|
||||||
|
|
||||||
|
## Build instructions
|
||||||
|
We are using Waf build system. If you have some Waf-related questions, I recommend you to read https://waf.io/book/
|
||||||
|
|
||||||
|
NOTE: NEVER USE GitHub's ZIP ARCHIVES. GitHub doesn't include external dependencies we're using!
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
|
||||||
|
If your CPU is x86 compatible, 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.
|
||||||
|
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-portable).
|
||||||
|
This repository contains our fork of HLSDK and restored source code for some of the mods. Not all of them, of course.
|
||||||
|
|
||||||
|
#### Windows (Visual Studio)
|
||||||
|
* Install Visual Studio.
|
||||||
|
* Install latest [Python](https://python.org) **OR** run `cinst python.install` if you have Chocolatey.
|
||||||
|
* Install latest [Git](https://git-scm.com/download/win) **OR** run `cinst git.install` if you have Chocolatey.
|
||||||
|
* Download [SDL2](https://libsdl.org/download-2.0.php) development package for Visual Studio.
|
||||||
|
* Clone this repository: `git clone --recursive https://github.com/FWGS/xash3d-fwgs`.
|
||||||
|
* Make sure you have at least 12GB of free space to store all build-time dependencies: ~10GB for Visual Studio, 300 MB for Git, 100 MB for Python and other.
|
||||||
|
|
||||||
|
#### GNU/Linux
|
||||||
|
##### Debian/Ubuntu
|
||||||
|
* Enable i386 on your system, if you're compiling 32-bit engine on amd64. If not, skip this
|
||||||
|
|
||||||
|
`$ sudo dpkg --add-architecture i386`
|
||||||
|
* Install development tools
|
||||||
|
* 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`
|
||||||
|
* For everything else: \
|
||||||
|
`$ sudo apt install build-essential python libsdl2-dev libfontconfig-dev libfreetype6-dev`
|
||||||
|
* Clone this repostory:
|
||||||
|
`$ git clone --recursive https://github.com/FWGS/xash3d-fwgs`
|
||||||
|
|
||||||
|
### Building
|
||||||
|
#### Windows (Visual Studio)
|
||||||
|
0) Open command line
|
||||||
|
1) Navigate to `xash3d-fwgs` directory.
|
||||||
|
2) Carefully examine which build options are available: `waf --help`
|
||||||
|
3) Configure build: `waf configure -T release --sdl2=c:/path/to/SDL2`
|
||||||
|
4) Compile: `waf build`
|
||||||
|
5) Install: `waf install --destdir=c:/path/to/any/output/directory`
|
||||||
|
|
||||||
|
#### 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.
|
||||||
|
|
||||||
|
0) Examine which build options are available: `./waf --help`
|
||||||
|
1) Configure build: `./waf configure -T release`
|
||||||
|
(You need to pass `-8` to compile 64-bit engine on 64-bit x86 processor)
|
||||||
|
2) Compile: `./waf build`
|
||||||
|
3) Install(optional): `./waf install --destdir=/path/to/any/output/directory`
|
||||||
53
common/backends.h
Normal file
53
common/backends.h
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
backends.h - backend macro definitions
|
||||||
|
Copyright (C) 2016 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.
|
||||||
|
*/
|
||||||
|
#ifndef BACKENDS_H
|
||||||
|
#define BACKENDS_H
|
||||||
|
|
||||||
|
// video backends (XASH_VIDEO)
|
||||||
|
#define VIDEO_NULL 0
|
||||||
|
#define VIDEO_SDL 1
|
||||||
|
#define VIDEO_FBDEV 3
|
||||||
|
#define VIDEO_DOS 4
|
||||||
|
|
||||||
|
// audio backends (XASH_SOUND)
|
||||||
|
#define SOUND_NULL 0
|
||||||
|
#define SOUND_SDL 1
|
||||||
|
#define SOUND_ALSA 3
|
||||||
|
|
||||||
|
// input (XASH_INPUT)
|
||||||
|
#define INPUT_NULL 0
|
||||||
|
#define INPUT_SDL 1
|
||||||
|
#define INPUT_EVDEV 3
|
||||||
|
|
||||||
|
// timer (XASH_TIMER)
|
||||||
|
#define TIMER_NULL 0 // not used
|
||||||
|
#define TIMER_SDL 1
|
||||||
|
#define TIMER_POSIX 2
|
||||||
|
#define TIMER_WIN32 3
|
||||||
|
#define TIMER_DOS 4
|
||||||
|
|
||||||
|
// messageboxes (XASH_MESSAGEBOX)
|
||||||
|
#define MSGBOX_STDERR 0
|
||||||
|
#define MSGBOX_SDL 1
|
||||||
|
#define MSGBOX_WIN32 3
|
||||||
|
#define MSGBOX_NSWITCH 4
|
||||||
|
|
||||||
|
// library loading (XASH_LIB)
|
||||||
|
#define LIB_NULL 0
|
||||||
|
#define LIB_POSIX 1
|
||||||
|
#define LIB_WIN32 2
|
||||||
|
#define LIB_STATIC 3
|
||||||
|
|
||||||
|
#endif /* BACKENDS_H */
|
||||||
@@ -61,23 +61,27 @@ 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
|
||||||
#define MAX_MAP_MARKSURFACES 524288 // can be increased without problems
|
#define MAX_MAP_MARKSURFACES 524288 // can be increased without problems
|
||||||
#else
|
#else
|
||||||
#define MAX_MAP_MODELS 768 // embedded models
|
// increased to match PrimeXT compilers
|
||||||
|
#define MAX_MAP_MODELS 1024 // embedded 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
|
||||||
|
|||||||
134
common/com_image.h
Normal file
134
common/com_image.h
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
#pragma once
|
||||||
|
/*
|
||||||
|
========================================================================
|
||||||
|
|
||||||
|
internal image format
|
||||||
|
|
||||||
|
typically expanded to rgba buffer
|
||||||
|
NOTE: number at end of pixelformat name it's a total bitscount e.g. PF_RGB_24 == PF_RGB_888
|
||||||
|
========================================================================
|
||||||
|
*/
|
||||||
|
#define ImageRAW( type ) (type == PF_RGBA_32 || type == PF_BGRA_32 || type == PF_RGB_24 || type == PF_BGR_24 || type == PF_LUMINANCE)
|
||||||
|
#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
|
||||||
|
{
|
||||||
|
PF_UNKNOWN = 0,
|
||||||
|
PF_INDEXED_24, // inflated palette (768 bytes)
|
||||||
|
PF_INDEXED_32, // deflated palette (1024 bytes)
|
||||||
|
PF_RGBA_32, // normal rgba buffer
|
||||||
|
PF_BGRA_32, // big endian RGBA (MacOS)
|
||||||
|
PF_RGB_24, // uncompressed dds or another 24-bit image
|
||||||
|
PF_BGR_24, // big-endian RGB (MacOS)
|
||||||
|
PF_LUMINANCE,
|
||||||
|
PF_DXT1, // s3tc DXT1/BC1 format
|
||||||
|
PF_DXT3, // s3tc DXT3/BC2 format
|
||||||
|
PF_DXT5, // s3tc DXT5/BC3 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_UNSIGNED, // bptc BC6H unsigned FP16 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
|
||||||
|
} pixformat_t;
|
||||||
|
|
||||||
|
typedef struct bpc_desc_s
|
||||||
|
{
|
||||||
|
int format; // pixelformat
|
||||||
|
char name[16]; // used for debug
|
||||||
|
uint glFormat; // RGBA format
|
||||||
|
int bpp; // channels (e.g. rgb = 3, rgba = 4)
|
||||||
|
} bpc_desc_t;
|
||||||
|
|
||||||
|
// imagelib global settings
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
IL_USE_LERPING = BIT(0), // lerping images during resample
|
||||||
|
IL_KEEP_8BIT = BIT(1), // don't expand paletted images
|
||||||
|
IL_ALLOW_OVERWRITE = BIT(2), // allow to overwrite stored images
|
||||||
|
IL_DONTFLIP_TGA = BIT(3), // Steam background completely ignore tga attribute 0x20 (stupid lammers!)
|
||||||
|
IL_DDS_HARDWARE = BIT(4), // DXT compression is support
|
||||||
|
IL_LOAD_DECAL = BIT(5), // special mode for load gradient decals
|
||||||
|
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;
|
||||||
|
|
||||||
|
// goes into rgbdata_t->encode
|
||||||
|
#define DXT_ENCODE_DEFAULT 0 // don't use custom encoders
|
||||||
|
#define DXT_ENCODE_COLOR_YCoCg 0x1A01 // make sure that value dosn't collide with anything
|
||||||
|
#define DXT_ENCODE_ALPHA_1BIT 0x1A02 // normal 1-bit alpha
|
||||||
|
#define DXT_ENCODE_ALPHA_8BIT 0x1A03 // normal 8-bit alpha
|
||||||
|
#define DXT_ENCODE_ALPHA_SDF 0x1A04 // signed distance field
|
||||||
|
#define DXT_ENCODE_NORMAL_AG_ORTHO 0x1A05 // orthographic projection
|
||||||
|
#define DXT_ENCODE_NORMAL_AG_STEREO 0x1A06 // stereographic projection
|
||||||
|
#define DXT_ENCODE_NORMAL_AG_PARABOLOID 0x1A07 // paraboloid projection
|
||||||
|
#define DXT_ENCODE_NORMAL_AG_QUARTIC 0x1A08 // newton method
|
||||||
|
#define DXT_ENCODE_NORMAL_AG_AZIMUTHAL 0x1A09 // Lambert Azimuthal Equal-Area
|
||||||
|
|
||||||
|
// rgbdata output flags
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
// rgbdata->flags
|
||||||
|
IMAGE_CUBEMAP = BIT(0), // it's 6-sides cubemap buffer
|
||||||
|
IMAGE_HAS_ALPHA = BIT(1), // image contain alpha-channel
|
||||||
|
IMAGE_HAS_COLOR = BIT(2), // image contain RGB-channel
|
||||||
|
IMAGE_COLORINDEX = BIT(3), // all colors in palette is gradients of last color (decals)
|
||||||
|
IMAGE_HAS_LUMA = BIT(4), // image has luma pixels (q1-style maps)
|
||||||
|
IMAGE_SKYBOX = BIT(5), // only used by FS_SaveImage - for write right suffixes
|
||||||
|
IMAGE_QUAKESKY = BIT(6), // it's a quake sky double layered clouds (so keep it as 8 bit)
|
||||||
|
IMAGE_DDS_FORMAT = BIT(7), // a hint for GL loader
|
||||||
|
IMAGE_MULTILAYER = BIT(8), // to differentiate from 3D texture
|
||||||
|
IMAGE_ONEBIT_ALPHA = BIT(9), // binary alpha
|
||||||
|
IMAGE_QUAKEPAL = BIT(10), // image has quake1 palette
|
||||||
|
|
||||||
|
// Image_Process manipulation flags
|
||||||
|
IMAGE_FLIP_X = BIT(16), // flip the image by width
|
||||||
|
IMAGE_FLIP_Y = BIT(17), // flip the image by height
|
||||||
|
IMAGE_ROT_90 = BIT(18), // flip from upper left corner to down right corner
|
||||||
|
IMAGE_ROT180 = IMAGE_FLIP_X|IMAGE_FLIP_Y,
|
||||||
|
IMAGE_ROT270 = IMAGE_FLIP_X|IMAGE_FLIP_Y|IMAGE_ROT_90,
|
||||||
|
// reserved
|
||||||
|
IMAGE_RESAMPLE = BIT(20), // resample image to specified dims
|
||||||
|
// reserved
|
||||||
|
// reserved
|
||||||
|
IMAGE_FORCE_RGBA = BIT(23), // force image to RGBA buffer
|
||||||
|
IMAGE_MAKE_LUMA = BIT(24), // create luma texture from indexed
|
||||||
|
IMAGE_QUANTIZE = BIT(25), // make indexed image from 24 or 32- bit image
|
||||||
|
IMAGE_LIGHTGAMMA = BIT(26), // apply gamma for image
|
||||||
|
IMAGE_REMAP = BIT(27), // interpret width and height as top and bottom color
|
||||||
|
} imgFlags_t;
|
||||||
|
|
||||||
|
typedef struct rgbdata_s
|
||||||
|
{
|
||||||
|
word width; // image width
|
||||||
|
word height; // image height
|
||||||
|
word depth; // image depth
|
||||||
|
uint type; // compression type
|
||||||
|
uint flags; // misc image flags
|
||||||
|
word encode; // DXT may have custom encoder, that will be decoded in GLSL-side
|
||||||
|
byte numMips; // mipmap count
|
||||||
|
byte *palette; // palette if present
|
||||||
|
byte *buffer; // image buffer
|
||||||
|
rgba_t fogParams; // some water textures in hl1 has info about fog color and alpha
|
||||||
|
size_t size; // for bounds checking
|
||||||
|
} rgbdata_t;
|
||||||
|
|
||||||
@@ -16,11 +16,9 @@ GNU General Public License for more details.
|
|||||||
#ifndef COM_MODEL_H
|
#ifndef COM_MODEL_H
|
||||||
#define COM_MODEL_H
|
#define COM_MODEL_H
|
||||||
|
|
||||||
|
#include "xash3d_types.h"
|
||||||
#include "bspfile.h" // we need some declarations from it
|
#include "bspfile.h" // we need some declarations from it
|
||||||
|
|
||||||
typedef vec_t vec2_t[2];
|
|
||||||
typedef vec_t vec4_t[4];
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
@@ -34,7 +32,8 @@ typedef vec_t vec4_t[4];
|
|||||||
|
|
||||||
#define MIPLEVELS 4
|
#define MIPLEVELS 4
|
||||||
#define VERTEXSIZE 7
|
#define VERTEXSIZE 7
|
||||||
#define MAXLIGHTMAPS 4
|
#define MAXLIGHTMAPS 4 // max light styles per face
|
||||||
|
#define MAXDYNLIGHTS 8 // maximum dynamic lights per one pixel
|
||||||
#define NUM_AMBIENTS 4 // automatic ambient sounds
|
#define NUM_AMBIENTS 4 // automatic ambient sounds
|
||||||
|
|
||||||
// model types
|
// model types
|
||||||
@@ -106,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
|
||||||
@@ -174,8 +173,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
|
glpoly_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
|
||||||
@@ -229,10 +228,10 @@ 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;
|
||||||
|
|
||||||
typedef struct msurface_s
|
struct msurface_s
|
||||||
{
|
{
|
||||||
int visframe; // should be drawn when node is crossed
|
int visframe; // should be drawn when node is crossed
|
||||||
|
|
||||||
@@ -264,7 +263,7 @@ typedef struct msurface_s
|
|||||||
|
|
||||||
color24 *samples; // note: this is the actual lightmap data for this surface
|
color24 *samples; // note: this is the actual lightmap data for this surface
|
||||||
decal_t *pdecals;
|
decal_t *pdecals;
|
||||||
} msurface_t;
|
};
|
||||||
|
|
||||||
typedef struct hull_s
|
typedef struct hull_s
|
||||||
{
|
{
|
||||||
@@ -292,7 +291,7 @@ typedef struct model_s
|
|||||||
// shared modelinfo
|
// shared modelinfo
|
||||||
modtype_t type; // model type
|
modtype_t type; // model type
|
||||||
int numframes; // sprite's framecount
|
int numframes; // sprite's framecount
|
||||||
byte *mempool; // private mempool (was synctype)
|
poolhandle_t mempool; // private mempool (was synctype)
|
||||||
int flags; // hl compatibility
|
int flags; // hl compatibility
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -504,4 +503,36 @@ typedef struct
|
|||||||
maliasframedesc_t frames[1]; // variable sized
|
maliasframedesc_t frames[1]; // variable sized
|
||||||
} aliashdr_t;
|
} aliashdr_t;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// remapping info
|
||||||
|
#define SUIT_HUE_START 192
|
||||||
|
#define SUIT_HUE_END 223
|
||||||
|
#define PLATE_HUE_START 160
|
||||||
|
#define PLATE_HUE_END 191
|
||||||
|
|
||||||
|
#define SHIRT_HUE_START 16
|
||||||
|
#define SHIRT_HUE_END 32
|
||||||
|
#define PANTS_HUE_START 96
|
||||||
|
#define PANTS_HUE_END 112
|
||||||
|
|
||||||
|
|
||||||
|
// 1/32 epsilon to keep floating point happy
|
||||||
|
#define DIST_EPSILON (1.0f / 32.0f)
|
||||||
|
#define FRAC_EPSILON (1.0f / 1024.0f)
|
||||||
|
#define BACKFACE_EPSILON 0.01f
|
||||||
|
#define MAX_BOX_LEAFS 256
|
||||||
|
#define ANIM_CYCLE 2
|
||||||
|
#define MOD_FRAMES 20
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define MAX_DEMOS 32
|
||||||
|
#define MAX_MOVIES 8
|
||||||
|
#define MAX_CDTRACKS 32
|
||||||
|
#define MAX_CLIENT_SPRITES 512 // SpriteTextures (0-256 hud, 256-512 client)
|
||||||
|
#define MAX_EFRAGS 8192 // Arcane Dimensions required
|
||||||
|
#define MAX_REQUESTS 64
|
||||||
|
|
||||||
|
|
||||||
#endif//COM_MODEL_H
|
#endif//COM_MODEL_H
|
||||||
128
common/const.h
128
common/const.h
@@ -20,45 +20,45 @@
|
|||||||
// Most came from server.h
|
// Most came from server.h
|
||||||
|
|
||||||
// edict->flags
|
// edict->flags
|
||||||
#define FL_FLY (1<<0) // Changes the SV_Movestep() behavior to not need to be on ground
|
#define FL_FLY (1U<<0) // Changes the SV_Movestep() behavior to not need to be on ground
|
||||||
#define FL_SWIM (1<<1) // Changes the SV_Movestep() behavior to not need to be on ground (but stay in water)
|
#define FL_SWIM (1U<<1) // Changes the SV_Movestep() behavior to not need to be on ground (but stay in water)
|
||||||
#define FL_CONVEYOR (1<<2)
|
#define FL_CONVEYOR (1U<<2)
|
||||||
#define FL_CLIENT (1<<3)
|
#define FL_CLIENT (1U<<3)
|
||||||
#define FL_INWATER (1<<4)
|
#define FL_INWATER (1U<<4)
|
||||||
#define FL_MONSTER (1<<5)
|
#define FL_MONSTER (1U<<5)
|
||||||
#define FL_GODMODE (1<<6)
|
#define FL_GODMODE (1U<<6)
|
||||||
#define FL_NOTARGET (1<<7)
|
#define FL_NOTARGET (1U<<7)
|
||||||
#define FL_SKIPLOCALHOST (1<<8) // Don't send entity to local host, it's predicting this entity itself
|
#define FL_SKIPLOCALHOST (1U<<8) // Don't send entity to local host, it's predicting this entity itself
|
||||||
#define FL_ONGROUND (1<<9) // At rest / on the ground
|
#define FL_ONGROUND (1U<<9) // At rest / on the ground
|
||||||
#define FL_PARTIALGROUND (1<<10) // not all corners are valid
|
#define FL_PARTIALGROUND (1U<<10) // not all corners are valid
|
||||||
#define FL_WATERJUMP (1<<11) // player jumping out of water
|
#define FL_WATERJUMP (1U<<11) // player jumping out of water
|
||||||
#define FL_FROZEN (1<<12) // Player is frozen for 3rd person camera
|
#define FL_FROZEN (1U<<12) // Player is frozen for 3rd person camera
|
||||||
#define FL_FAKECLIENT (1<<13) // JAC: fake client, simulated server side; don't send network messages to them
|
#define FL_FAKECLIENT (1U<<13) // JAC: fake client, simulated server side; don't send network messages to them
|
||||||
#define FL_DUCKING (1<<14) // Player flag -- Player is fully crouched
|
#define FL_DUCKING (1U<<14) // Player flag -- Player is fully crouched
|
||||||
#define FL_FLOAT (1<<15) // Apply floating force to this entity when in water
|
#define FL_FLOAT (1U<<15) // Apply floating force to this entity when in water
|
||||||
#define FL_GRAPHED (1<<16) // worldgraph has this ent listed as something that blocks a connection
|
#define FL_GRAPHED (1U<<16) // worldgraph has this ent listed as something that blocks a connection
|
||||||
|
|
||||||
// UNDONE: Do we need these?
|
// UNDONE: Do we need these?
|
||||||
#define FL_IMMUNE_WATER (1<<17)
|
#define FL_IMMUNE_WATER (1U<<17)
|
||||||
#define FL_IMMUNE_SLIME (1<<18)
|
#define FL_IMMUNE_SLIME (1U<<18)
|
||||||
#define FL_IMMUNE_LAVA (1<<19)
|
#define FL_IMMUNE_LAVA (1U<<19)
|
||||||
|
|
||||||
#define FL_PROXY (1<<20) // This is a spectator proxy
|
#define FL_PROXY (1U<<20) // This is a spectator proxy
|
||||||
#define FL_ALWAYSTHINK (1<<21) // Brush model flag -- call think every frame regardless of nextthink - ltime (for constantly changing velocity/path)
|
#define FL_ALWAYSTHINK (1U<<21) // Brush model flag -- call think every frame regardless of nextthink - ltime (for constantly changing velocity/path)
|
||||||
#define FL_BASEVELOCITY (1<<22) // Base velocity has been applied this frame (used to convert base velocity into momentum)
|
#define FL_BASEVELOCITY (1U<<22) // Base velocity has been applied this frame (used to convert base velocity into momentum)
|
||||||
#define FL_MONSTERCLIP (1<<23) // Only collide in with monsters who have FL_MONSTERCLIP set
|
#define FL_MONSTERCLIP (1U<<23) // Only collide in with monsters who have FL_MONSTERCLIP set
|
||||||
#define FL_ONTRAIN (1<<24) // Player is _controlling_ a train, so movement commands should be ignored on client during prediction.
|
#define FL_ONTRAIN (1U<<24) // Player is _controlling_ a train, so movement commands should be ignored on client during prediction.
|
||||||
#define FL_WORLDBRUSH (1<<25) // Not moveable/removeable brush entity (really part of the world, but represented as an entity for transparency or something)
|
#define FL_WORLDBRUSH (1U<<25) // Not moveable/removeable brush entity (really part of the world, but represented as an entity for transparency or something)
|
||||||
#define FL_SPECTATOR (1<<26) // This client is a spectator, don't run touch functions, etc.
|
#define FL_SPECTATOR (1U<<26) // This client is a spectator, don't run touch functions, etc.
|
||||||
#define FL_LASERDOT (1<<27) // Predicted laser spot from rocket launcher
|
#define FL_LASERDOT (1U<<27) // Predicted laser spot from rocket launcher
|
||||||
|
|
||||||
#define FL_CUSTOMENTITY (1<<29) // This is a custom entity
|
#define FL_CUSTOMENTITY (1U<<29) // This is a custom entity
|
||||||
#define FL_KILLME (1<<30) // This entity is marked for death -- This allows the engine to kill ents at the appropriate time
|
#define FL_KILLME (1U<<30) // This entity is marked for death -- This allows the engine to kill ents at the appropriate time
|
||||||
#define FL_DORMANT (1<<31) // Entity is dormant, no updates to client
|
#define FL_DORMANT (1U<<31) // Entity is dormant, no updates to client
|
||||||
|
|
||||||
// Goes into globalvars_t.trace_flags
|
// Goes into globalvars_t.trace_flags
|
||||||
#define FTRACE_SIMPLEBOX (1<<0) // Traceline with a simple box
|
#define FTRACE_SIMPLEBOX (1U<<0) // Traceline with a simple box
|
||||||
#define FTRACE_IGNORE_GLASS (1<<1) // traceline will be ignored entities with rendermode != kRenderNormal
|
#define FTRACE_IGNORE_GLASS (1U<<1) // traceline will be ignored entities with rendermode != kRenderNormal
|
||||||
|
|
||||||
// walkmove modes
|
// walkmove modes
|
||||||
#define WALKMOVE_NORMAL 0 // normal walkmove
|
#define WALKMOVE_NORMAL 0 // normal walkmove
|
||||||
@@ -114,11 +114,11 @@
|
|||||||
#define EF_LIGHT 64 // rocket flare glow sprite
|
#define EF_LIGHT 64 // rocket flare glow sprite
|
||||||
#define EF_NODRAW 128 // don't draw entity
|
#define EF_NODRAW 128 // don't draw entity
|
||||||
|
|
||||||
#define EF_WATERSIDES (1<<26) // Do not remove sides for func_water entity
|
#define EF_WATERSIDES (1U<<26) // Do not remove sides for func_water entity
|
||||||
#define EF_FULLBRIGHT (1<<27) // Just get fullbright
|
#define EF_FULLBRIGHT (1U<<27) // Just get fullbright
|
||||||
#define EF_NOSHADOW (1<<28) // ignore shadow for this entity
|
#define EF_NOSHADOW (1U<<28) // ignore shadow for this entity
|
||||||
#define EF_MERGE_VISIBILITY (1<<29) // this entity allowed to merge vis (e.g. env_sky or portal camera)
|
#define EF_MERGE_VISIBILITY (1U<<29) // this entity allowed to merge vis (e.g. env_sky or portal camera)
|
||||||
#define EF_REQUEST_PHS (1<<30) // This entity requested phs bitvector instead of pvsbitvector in AddToFullPack calls
|
#define EF_REQUEST_PHS (1U<<30) // This entity requested phs bitvector instead of pvsbitvector in AddToFullPack calls
|
||||||
// g-cont. one reserved bit here for me
|
// g-cont. one reserved bit here for me
|
||||||
|
|
||||||
// entity flags
|
// entity flags
|
||||||
@@ -606,13 +606,6 @@
|
|||||||
#define CONTENT_GRAVITY_FLYFIELD -18
|
#define CONTENT_GRAVITY_FLYFIELD -18
|
||||||
#define CONTENT_FOG -19
|
#define CONTENT_FOG -19
|
||||||
|
|
||||||
#define CONTENT_EMPTY -1
|
|
||||||
#define CONTENT_SOLID -2
|
|
||||||
#define CONTENT_WATER -3
|
|
||||||
#define CONTENT_SLIME -4
|
|
||||||
#define CONTENT_LAVA -5
|
|
||||||
#define CONTENT_SKY -6
|
|
||||||
|
|
||||||
// channels
|
// channels
|
||||||
#define CHAN_AUTO 0
|
#define CHAN_AUTO 0
|
||||||
#define CHAN_WEAPON 1
|
#define CHAN_WEAPON 1
|
||||||
@@ -647,22 +640,22 @@
|
|||||||
#define SF_TRAIN_PASSABLE 8 // Train is not solid -- used to make water trains
|
#define SF_TRAIN_PASSABLE 8 // Train is not solid -- used to make water trains
|
||||||
|
|
||||||
// buttons
|
// buttons
|
||||||
#define IN_ATTACK (1<<0)
|
#define IN_ATTACK (1U<<0)
|
||||||
#define IN_JUMP (1<<1)
|
#define IN_JUMP (1U<<1)
|
||||||
#define IN_DUCK (1<<2)
|
#define IN_DUCK (1U<<2)
|
||||||
#define IN_FORWARD (1<<3)
|
#define IN_FORWARD (1U<<3)
|
||||||
#define IN_BACK (1<<4)
|
#define IN_BACK (1U<<4)
|
||||||
#define IN_USE (1<<5)
|
#define IN_USE (1U<<5)
|
||||||
#define IN_CANCEL (1<<6)
|
#define IN_CANCEL (1U<<6)
|
||||||
#define IN_LEFT (1<<7)
|
#define IN_LEFT (1U<<7)
|
||||||
#define IN_RIGHT (1<<8)
|
#define IN_RIGHT (1U<<8)
|
||||||
#define IN_MOVELEFT (1<<9)
|
#define IN_MOVELEFT (1U<<9)
|
||||||
#define IN_MOVERIGHT (1<<10)
|
#define IN_MOVERIGHT (1U<<10)
|
||||||
#define IN_ATTACK2 (1<<11)
|
#define IN_ATTACK2 (1U<<11)
|
||||||
#define IN_RUN (1<<12)
|
#define IN_RUN (1U<<12)
|
||||||
#define IN_RELOAD (1<<13)
|
#define IN_RELOAD (1U<<13)
|
||||||
#define IN_ALT1 (1<<14)
|
#define IN_ALT1 (1U<<14)
|
||||||
#define IN_SCORE (1<<15) // Used by client.dll for when scoreboard is held down
|
#define IN_SCORE (1U<<15) // Used by client.dll for when scoreboard is held down
|
||||||
|
|
||||||
// Break Model Defines
|
// Break Model Defines
|
||||||
#define BREAK_TYPEMASK 0x4F
|
#define BREAK_TYPEMASK 0x4F
|
||||||
@@ -724,24 +717,15 @@ 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;
|
||||||
typedef int string_t;
|
typedef int string_t;
|
||||||
|
|
||||||
typedef unsigned char byte;
|
|
||||||
typedef unsigned short word;
|
typedef unsigned short word;
|
||||||
|
|
||||||
#define Q_isspace( ch ) (ch < 32 || ch > 255)
|
#include "xash3d_types.h"
|
||||||
|
|
||||||
#undef true
|
|
||||||
#undef false
|
|
||||||
|
|
||||||
#ifndef __cplusplus
|
|
||||||
typedef enum { false, true } qboolean;
|
|
||||||
#else
|
|
||||||
typedef int qboolean;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,14 +25,18 @@
|
|||||||
#define FCVAR_PRINTABLEONLY (1<<7) // This cvar's string cannot contain unprintable characters ( e.g., used for player name etc ).
|
#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_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_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
|
||||||
|
|
||||||
#define FCVAR_MOVEVARS (1<<10) // this cvar is a part of movevars_t struct that shared between client and server
|
// Xash3D extensions
|
||||||
#define FCVAR_LATCH (1<<11) // notify client what this cvar will be applied only after server restart (but don't does more nothing)
|
#define FCVAR_GLCONFIG (1<<12) // write it into <renderer>.cfg(see RefAPI)
|
||||||
#define FCVAR_GLCONFIG (1<<12) // write it into opengl.cfg
|
|
||||||
#define FCVAR_CHANGED (1<<13) // set each time the cvar is changed
|
#define FCVAR_CHANGED (1<<13) // set each time the cvar is changed
|
||||||
#define FCVAR_GAMEUIDLL (1<<14) // defined by the menu DLL
|
#define FCVAR_GAMEUIDLL (1<<14) // defined by the menu DLL
|
||||||
#define FCVAR_CHEAT (1<<15) // can not be changed if cheats are disabled
|
#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
|
||||||
|
#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
|
typedef struct cvar_s
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
|
|||||||
196
common/defaults.h
Normal file
196
common/defaults.h
Normal file
@@ -0,0 +1,196 @@
|
|||||||
|
/*
|
||||||
|
defaults.h - set up default configuration
|
||||||
|
Copyright (C) 2016 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef DEFAULTS_H
|
||||||
|
#define DEFAULTS_H
|
||||||
|
|
||||||
|
#include "backends.h"
|
||||||
|
#include "build.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
===================================================================
|
||||||
|
|
||||||
|
SETUP BACKENDS DEFINITIONS
|
||||||
|
|
||||||
|
===================================================================
|
||||||
|
*/
|
||||||
|
#if !XASH_DEDICATED
|
||||||
|
#if XASH_SDL
|
||||||
|
// we are building using libSDL
|
||||||
|
#ifndef XASH_VIDEO
|
||||||
|
#define XASH_VIDEO VIDEO_SDL
|
||||||
|
#endif // XASH_VIDEO
|
||||||
|
|
||||||
|
#ifndef XASH_INPUT
|
||||||
|
#define XASH_INPUT INPUT_SDL
|
||||||
|
#endif // XASH_INPUT
|
||||||
|
|
||||||
|
#ifndef XASH_SOUND
|
||||||
|
#define XASH_SOUND SOUND_SDL
|
||||||
|
#endif // XASH_SOUND
|
||||||
|
|
||||||
|
#if XASH_SDL == 2
|
||||||
|
#ifndef XASH_TIMER
|
||||||
|
#define XASH_TIMER TIMER_SDL
|
||||||
|
#endif // XASH_TIMER
|
||||||
|
|
||||||
|
#ifndef XASH_MESSAGEBOX
|
||||||
|
#if !XASH_NSWITCH // SDL2 messageboxes not available
|
||||||
|
#define XASH_MESSAGEBOX MSGBOX_SDL
|
||||||
|
#endif
|
||||||
|
#endif // XASH_MESSAGEBOX
|
||||||
|
#endif
|
||||||
|
#elif XASH_LINUX
|
||||||
|
// we are building for Linux without SDL2, can draw only to framebuffer yet
|
||||||
|
#ifndef XASH_VIDEO
|
||||||
|
#define XASH_VIDEO VIDEO_FBDEV
|
||||||
|
#endif // XASH_VIDEO
|
||||||
|
|
||||||
|
#ifndef XASH_INPUT
|
||||||
|
#define XASH_INPUT INPUT_EVDEV
|
||||||
|
#endif // XASH_INPUT
|
||||||
|
|
||||||
|
#ifndef XASH_SOUND
|
||||||
|
#define XASH_SOUND SOUND_ALSA
|
||||||
|
#endif // XASH_SOUND
|
||||||
|
|
||||||
|
#define XASH_USE_EVDEV 1
|
||||||
|
#elif XASH_DOS4GW
|
||||||
|
#ifndef XASH_VIDEO
|
||||||
|
#define XASH_VIDEO VIDEO_DOS
|
||||||
|
#endif
|
||||||
|
#ifndef XASH_TIMER
|
||||||
|
#define XASH_TIMER TIMER_DOS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// usually only 10-20 fds availiable
|
||||||
|
#define XASH_REDUCE_FD
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // XASH_DEDICATED
|
||||||
|
|
||||||
|
//
|
||||||
|
// select messagebox implementation
|
||||||
|
//
|
||||||
|
#ifndef XASH_MESSAGEBOX
|
||||||
|
#if XASH_WIN32
|
||||||
|
#define XASH_MESSAGEBOX MSGBOX_WIN32
|
||||||
|
#elif XASH_NSWITCH
|
||||||
|
#define XASH_MESSAGEBOX MSGBOX_NSWITCH
|
||||||
|
#else // !XASH_WIN32
|
||||||
|
#define XASH_MESSAGEBOX MSGBOX_STDERR
|
||||||
|
#endif // !XASH_WIN32
|
||||||
|
#endif // XASH_MESSAGEBOX
|
||||||
|
|
||||||
|
//
|
||||||
|
// no timer - no xash
|
||||||
|
//
|
||||||
|
#ifndef XASH_TIMER
|
||||||
|
#if XASH_WIN32
|
||||||
|
#define XASH_TIMER TIMER_WIN32
|
||||||
|
#else // !XASH_WIN32
|
||||||
|
#define XASH_TIMER TIMER_POSIX
|
||||||
|
#endif // !XASH_WIN32
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef XASH_STATIC_LIBS
|
||||||
|
#define XASH_LIB LIB_STATIC
|
||||||
|
#define XASH_INTERNAL_GAMELIBS
|
||||||
|
#define XASH_ALLOW_SAVERESTORE_OFFSETS
|
||||||
|
#elif XASH_WIN32
|
||||||
|
#define XASH_LIB LIB_WIN32
|
||||||
|
#elif XASH_POSIX
|
||||||
|
#define XASH_LIB LIB_POSIX
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//
|
||||||
|
// fallback to NULL
|
||||||
|
//
|
||||||
|
#ifndef XASH_VIDEO
|
||||||
|
#define XASH_VIDEO VIDEO_NULL
|
||||||
|
#endif // XASH_VIDEO
|
||||||
|
|
||||||
|
#ifndef XASH_SOUND
|
||||||
|
#define XASH_SOUND SOUND_NULL
|
||||||
|
#endif // XASH_SOUND
|
||||||
|
|
||||||
|
#ifndef XASH_INPUT
|
||||||
|
#define XASH_INPUT INPUT_NULL
|
||||||
|
#endif // XASH_INPUT
|
||||||
|
|
||||||
|
/*
|
||||||
|
=========================================================================
|
||||||
|
|
||||||
|
Default build-depended cvar and constant values
|
||||||
|
|
||||||
|
=========================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Platform overrides
|
||||||
|
#if XASH_NSWITCH
|
||||||
|
#define DEFAULT_TOUCH_ENABLE "0"
|
||||||
|
#define DEFAULT_M_IGNORE "1"
|
||||||
|
#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
|
||||||
|
// 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
|
||||||
|
#define XASH_INTERNAL_GAMELIBS
|
||||||
|
#endif // XASH_ANDROID || XASH_IOS || XASH_EMSCRIPTEN
|
||||||
|
|
||||||
|
// 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
|
||||||
|
#define DEFAULT_DEV 0
|
||||||
|
#endif // DEFAULT_DEV
|
||||||
|
|
||||||
|
#ifndef DEFAULT_ALLOWCONSOLE
|
||||||
|
#define DEFAULT_ALLOWCONSOLE 0
|
||||||
|
#endif // DEFAULT_ALLOWCONSOLE
|
||||||
|
|
||||||
|
#ifndef DEFAULT_FULLSCREEN
|
||||||
|
#define DEFAULT_FULLSCREEN "1" // must be a string
|
||||||
|
#endif // DEFAULT_FULLSCREEN
|
||||||
|
|
||||||
|
#ifndef DEFAULT_MAX_EDICTS
|
||||||
|
#define DEFAULT_MAX_EDICTS 1200 // was 900 before HL25
|
||||||
|
#endif // DEFAULT_MAX_EDICTS
|
||||||
|
|
||||||
|
#endif // DEFAULTS_H
|
||||||
@@ -25,5 +25,21 @@ GNU General Public License for more details.
|
|||||||
#define ENGINE_COMPENSATE_QUAKE_BUG (1<<5) // compensate stupid quake bug (inverse pitch) for mods where this bug is fixed
|
#define ENGINE_COMPENSATE_QUAKE_BUG (1<<5) // compensate stupid quake bug (inverse pitch) for mods where this bug is fixed
|
||||||
#define ENGINE_IMPROVED_LINETRACE (1<<6) // new traceline that tracing through alphatextures
|
#define ENGINE_IMPROVED_LINETRACE (1<<6) // new traceline that tracing through alphatextures
|
||||||
#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_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
|
||||||
@@ -18,6 +18,9 @@ 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_HD_BACKGROUND (1<<3)
|
||||||
|
#define GFL_ANIMATED_TITLE (1<<4)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
========================================================================
|
========================================================================
|
||||||
|
|||||||
35
common/kbutton.h
Normal file
35
common/kbutton.h
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
Copyright (C) 1996-1997 Id Software, Inc.
|
||||||
|
|
||||||
|
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 KBUTTON_H
|
||||||
|
#define KBUTTON_H
|
||||||
|
|
||||||
|
// a1ba: copied from WinQuake/client.h
|
||||||
|
//
|
||||||
|
// cl_input
|
||||||
|
//
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
int down[2]; // key nums holding it down
|
||||||
|
int state; // low bit is down state
|
||||||
|
} kbutton_t;
|
||||||
|
|
||||||
|
STATIC_ASSERT( sizeof( kbutton_t ) == 12, "kbutton_t isn't 12 bytes!" );
|
||||||
|
|
||||||
|
#endif // KBUTTON_H
|
||||||
@@ -28,6 +28,7 @@
|
|||||||
// 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 )
|
||||||
|
|
||||||
|
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 );
|
||||||
|
|
||||||
#define NET_SUCCESS ( 0 )
|
#define NET_SUCCESS ( 0 )
|
||||||
@@ -86,7 +87,7 @@ typedef struct net_api_s
|
|||||||
void (*SendRequest)( int context, int request, int flags, double timeout, struct netadr_s *remote_address, net_api_response_func_t response );
|
void (*SendRequest)( int context, int request, int flags, double timeout, struct netadr_s *remote_address, net_api_response_func_t response );
|
||||||
void (*CancelRequest)( int context );
|
void (*CancelRequest)( int context );
|
||||||
void (*CancelAllRequests)( void );
|
void (*CancelAllRequests)( void );
|
||||||
char *(*AdrToString)( struct netadr_s *a );
|
const char *(*AdrToString)( struct netadr_s *a );
|
||||||
int ( *CompareAdr)( struct netadr_s *a, struct netadr_s *b );
|
int ( *CompareAdr)( struct netadr_s *a, struct netadr_s *b );
|
||||||
int ( *StringToAdr)( char *s, struct netadr_s *a );
|
int ( *StringToAdr)( char *s, struct netadr_s *a );
|
||||||
const char *(*ValueForKey)( const char *s, const char *key );
|
const char *(*ValueForKey)( const char *s, const char *key );
|
||||||
|
|||||||
@@ -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_ASSERT( sizeof( netadr_t ) == 20, "netadr_t isn't 20 bytes!" );
|
||||||
|
|
||||||
|
#endif // NET_ADR_H
|
||||||
|
|||||||
93
common/port.h
Normal file
93
common/port.h
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
/*
|
||||||
|
port.h -- Portability Layer for Windows types
|
||||||
|
Copyright (C) 2015 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 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#ifndef PORT_H
|
||||||
|
#define PORT_H
|
||||||
|
|
||||||
|
#include "build.h"
|
||||||
|
|
||||||
|
#if !XASH_WIN32
|
||||||
|
#if XASH_APPLE
|
||||||
|
#include <sys/syslimits.h>
|
||||||
|
#define OS_LIB_EXT "dylib"
|
||||||
|
#define OPEN_COMMAND "open"
|
||||||
|
#else
|
||||||
|
#define OS_LIB_EXT "so"
|
||||||
|
#define OPEN_COMMAND "xdg-open"
|
||||||
|
#endif
|
||||||
|
#define OS_LIB_PREFIX "lib"
|
||||||
|
#define VGUI_SUPPORT_DLL "libvgui_support." OS_LIB_EXT
|
||||||
|
|
||||||
|
// Windows-specific
|
||||||
|
#define __cdecl
|
||||||
|
#define __stdcall
|
||||||
|
#define _inline static inline
|
||||||
|
|
||||||
|
#if XASH_POSIX
|
||||||
|
#include <unistd.h>
|
||||||
|
#if XASH_NSWITCH
|
||||||
|
#define SOLDER_LIBDL_COMPAT
|
||||||
|
#include <solder.h>
|
||||||
|
#elif XASH_PSVITA
|
||||||
|
#define VRTLD_LIBDL_COMPAT
|
||||||
|
#include <vrtld.h>
|
||||||
|
#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 )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef void* HANDLE;
|
||||||
|
typedef void* HINSTANCE;
|
||||||
|
|
||||||
|
typedef struct tagPOINT
|
||||||
|
{
|
||||||
|
int x, y;
|
||||||
|
} POINT;
|
||||||
|
#else // WIN32
|
||||||
|
#define open _open
|
||||||
|
#define read _read
|
||||||
|
#define alloca _alloca
|
||||||
|
|
||||||
|
#define HSPRITE WINAPI_HSPRITE
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#include <winsock2.h>
|
||||||
|
#include <windows.h>
|
||||||
|
#undef HSPRITE
|
||||||
|
|
||||||
|
#define OS_LIB_PREFIX ""
|
||||||
|
#define OS_LIB_EXT "dll"
|
||||||
|
#define VGUI_SUPPORT_DLL "../vgui_support." OS_LIB_EXT
|
||||||
|
#define HAVE_DUP
|
||||||
|
#endif //WIN32
|
||||||
|
|
||||||
|
#ifndef XASH_LOW_MEMORY
|
||||||
|
#define XASH_LOW_MEMORY 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
|
#if defined XASH_SDL && !defined REF_DLL
|
||||||
|
#include <SDL.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // PORT_H
|
||||||
@@ -84,7 +84,7 @@ color24 gTracerColors[] =
|
|||||||
#define FTENT_CLIENTCUSTOM 0x00080000 // Must specify callback. Callback function is responsible for killing tempent and updating fields ( unless other flags specify how to do things )
|
#define FTENT_CLIENTCUSTOM 0x00080000 // Must specify callback. Callback function is responsible for killing tempent and updating fields ( unless other flags specify how to do things )
|
||||||
#define FTENT_SCALE 0x00100000 // An experiment
|
#define FTENT_SCALE 0x00100000 // An experiment
|
||||||
|
|
||||||
typedef struct tempent_s TEMPENTITY;
|
struct pmtrace_s;
|
||||||
typedef struct tempent_s
|
typedef struct tempent_s
|
||||||
{
|
{
|
||||||
int flags;
|
int flags;
|
||||||
@@ -98,7 +98,7 @@ typedef struct tempent_s
|
|||||||
int hitSound;
|
int hitSound;
|
||||||
void (*hitcallback)( struct tempent_s *ent, struct pmtrace_s *ptr );
|
void (*hitcallback)( struct tempent_s *ent, struct pmtrace_s *ptr );
|
||||||
void (*callback)( struct tempent_s *ent, float frametime, float currenttime );
|
void (*callback)( struct tempent_s *ent, float frametime, float currenttime );
|
||||||
TEMPENTITY *next;
|
struct tempent_s *next;
|
||||||
int priority;
|
int priority;
|
||||||
short clientIndex; // if attached, this is the index of the client to stick to
|
short clientIndex; // if attached, this is the index of the client to stick to
|
||||||
// if COLLIDEALL, this is the index of the client to ignore
|
// if COLLIDEALL, this is the index of the client to ignore
|
||||||
@@ -117,58 +117,58 @@ typedef struct efx_api_s efx_api_t;
|
|||||||
struct efx_api_s
|
struct efx_api_s
|
||||||
{
|
{
|
||||||
particle_t *(*R_AllocParticle)( void (*callback)( struct particle_s *particle, float frametime ));
|
particle_t *(*R_AllocParticle)( void (*callback)( struct particle_s *particle, float frametime ));
|
||||||
void (*R_BlobExplosion)( float *org );
|
void (*R_BlobExplosion)( const float *org );
|
||||||
void (*R_Blood)( float *org, float *dir, int pcolor, int speed );
|
void (*R_Blood)( const float *org, const float *dir, int pcolor, int speed );
|
||||||
void (*R_BloodSprite)( float *org, int colorindex, int modelIndex, int modelIndex2, float size );
|
void (*R_BloodSprite)( const float *org, int colorindex, int modelIndex, int modelIndex2, float size );
|
||||||
void (*R_BloodStream)( float *org, float *dir, int pcolor, int speed );
|
void (*R_BloodStream)( const float *org, const float *dir, int pcolor, int speed );
|
||||||
void (*R_BreakModel)( float *pos, float *size, float *dir, float random, float life, int count, int modelIndex, char flags );
|
void (*R_BreakModel)( const float *pos, const float *size, const float *dir, float random, float life, int count, int modelIndex, char flags );
|
||||||
void (*R_Bubbles)( float *mins, float *maxs, float height, int modelIndex, int count, float speed );
|
void (*R_Bubbles)( const float *mins, const float *maxs, float height, int modelIndex, int count, float speed );
|
||||||
void (*R_BubbleTrail)( float *start, float *end, float height, int modelIndex, int count, float speed );
|
void (*R_BubbleTrail)( const float *start, const float *end, float height, int modelIndex, int count, float speed );
|
||||||
void (*R_BulletImpactParticles)( float *pos );
|
void (*R_BulletImpactParticles)( const float *pos );
|
||||||
void (*R_EntityParticles)( struct cl_entity_s *ent );
|
void (*R_EntityParticles)( struct cl_entity_s *ent );
|
||||||
void (*R_Explosion)( float *pos, int model, float scale, float framerate, int flags );
|
void (*R_Explosion)( float *pos, int model, float scale, float framerate, int flags );
|
||||||
void (*R_FizzEffect)( struct cl_entity_s *pent, int modelIndex, int density );
|
void (*R_FizzEffect)( struct cl_entity_s *pent, int modelIndex, int density );
|
||||||
void (*R_FireField)( float *org, int radius, int modelIndex, int count, int flags, float life );
|
void (*R_FireField)( float *org, int radius, int modelIndex, int count, int flags, float life );
|
||||||
void (*R_FlickerParticles)( float *org );
|
void (*R_FlickerParticles)( const float *org );
|
||||||
void (*R_FunnelSprite)( float *org, int modelIndex, int reverse );
|
void (*R_FunnelSprite)( const float *org, int modelIndex, int reverse );
|
||||||
void (*R_Implosion)( float *end, float radius, int count, float life );
|
void (*R_Implosion)( const float *end, float radius, int count, float life );
|
||||||
void (*R_LargeFunnel)( float *org, int reverse );
|
void (*R_LargeFunnel)( const float *org, int reverse );
|
||||||
void (*R_LavaSplash)( float *org );
|
void (*R_LavaSplash)( const float *org );
|
||||||
void (*R_MultiGunshot)( float *org, float *dir, float *noise, int count, int decalCount, int *decalIndices );
|
void (*R_MultiGunshot)( const float *org, const float *dir, const float *noise, int count, int decalCount, int *decalIndices );
|
||||||
void (*R_MuzzleFlash)( float *pos1, int type );
|
void (*R_MuzzleFlash)( const float *pos1, int type );
|
||||||
void (*R_ParticleBox)( float *mins, float *maxs, unsigned char r, unsigned char g, unsigned char b, float life );
|
void (*R_ParticleBox)( const float *mins, const float *maxs, unsigned char r, unsigned char g, unsigned char b, float life );
|
||||||
void (*R_ParticleBurst)( float *pos, int size, int color, float life );
|
void (*R_ParticleBurst)( const float *pos, int size, int color, float life );
|
||||||
void (*R_ParticleExplosion)( float *org );
|
void (*R_ParticleExplosion)( const float *org );
|
||||||
void (*R_ParticleExplosion2)( float *org, int colorStart, int colorLength );
|
void (*R_ParticleExplosion2)( const float *org, int colorStart, int colorLength );
|
||||||
void (*R_ParticleLine)( float *start, float *end, unsigned char r, unsigned char g, unsigned char b, float life );
|
void (*R_ParticleLine)( const float *start, const float *end, unsigned char r, unsigned char g, unsigned char b, float life );
|
||||||
void (*R_PlayerSprites)( int client, int modelIndex, int count, int size );
|
void (*R_PlayerSprites)( int client, int modelIndex, int count, int size );
|
||||||
void (*R_Projectile)( float *origin, float *velocity, int modelIndex, int life, int owner, void (*hitcallback)( struct tempent_s *ent, struct pmtrace_s *ptr ) );
|
void (*R_Projectile)( const float *origin, const float *velocity, int modelIndex, int life, int owner, void (*hitcallback)( struct tempent_s *ent, struct pmtrace_s *ptr ) );
|
||||||
void (*R_RicochetSound)( float *pos );
|
void (*R_RicochetSound)( const float *pos );
|
||||||
void (*R_RicochetSprite)( float *pos, struct model_s *pmodel, float duration, float scale );
|
void (*R_RicochetSprite)( const float *pos, struct model_s *pmodel, float duration, float scale );
|
||||||
void (*R_RocketFlare)( float *pos );
|
void (*R_RocketFlare)( const float *pos );
|
||||||
void (*R_RocketTrail)( float *start, float *end, int type );
|
void (*R_RocketTrail)( float *start, float *end, int type );
|
||||||
void (*R_RunParticleEffect)( float *org, float *dir, int color, int count );
|
void (*R_RunParticleEffect)( const float *org, const float *dir, int color, int count );
|
||||||
void (*R_ShowLine)( float *start, float *end );
|
void (*R_ShowLine)( const float *start, const float *end );
|
||||||
void (*R_SparkEffect)( float *pos, int count, int velocityMin, int velocityMax );
|
void (*R_SparkEffect)( const float *pos, int count, int velocityMin, int velocityMax );
|
||||||
void (*R_SparkShower)( float *pos );
|
void (*R_SparkShower)( const float *pos );
|
||||||
void (*R_SparkStreaks)( float *pos, int count, int velocityMin, int velocityMax );
|
void (*R_SparkStreaks)( const float *pos, int count, int velocityMin, int velocityMax );
|
||||||
void (*R_Spray)( float *pos, float *dir, int modelIndex, int count, int speed, int spread, int rendermode );
|
void (*R_Spray)( const float *pos, const float *dir, int modelIndex, int count, int speed, int spread, int rendermode );
|
||||||
void (*R_Sprite_Explode)( TEMPENTITY *pTemp, float scale, int flags );
|
void (*R_Sprite_Explode)( TEMPENTITY *pTemp, float scale, int flags );
|
||||||
void (*R_Sprite_Smoke)( TEMPENTITY *pTemp, float scale );
|
void (*R_Sprite_Smoke)( TEMPENTITY *pTemp, float scale );
|
||||||
void (*R_Sprite_Spray)( float *pos, float *dir, int modelIndex, int count, int speed, int iRand );
|
void (*R_Sprite_Spray)( const float *pos, const float *dir, int modelIndex, int count, int speed, int iRand );
|
||||||
void (*R_Sprite_Trail)( int type, float *start, float *end, int modelIndex, int count, float life, float size, float amplitude, int renderamt, float speed );
|
void (*R_Sprite_Trail)( int type, float *start, float *end, int modelIndex, int count, float life, float size, float amplitude, int renderamt, float speed );
|
||||||
void (*R_Sprite_WallPuff)( TEMPENTITY *pTemp, float scale );
|
void (*R_Sprite_WallPuff)( TEMPENTITY *pTemp, float scale );
|
||||||
void (*R_StreakSplash)( float *pos, float *dir, int color, int count, float speed, int velocityMin, int velocityMax );
|
void (*R_StreakSplash)( const float *pos, const float *dir, int color, int count, float speed, int velocityMin, int velocityMax );
|
||||||
void (*R_TracerEffect)( float *start, float *end );
|
void (*R_TracerEffect)( const float *start, const float *end );
|
||||||
void (*R_UserTracerParticle)( float *org, float *vel, float life, int colorIndex, float length, unsigned char deathcontext, void (*deathfunc)( struct particle_s *particle ));
|
void (*R_UserTracerParticle)( float *org, float *vel, float life, int colorIndex, float length, unsigned char deathcontext, void (*deathfunc)( struct particle_s *particle ));
|
||||||
particle_t *(*R_TracerParticles)( float *org, float *vel, float life );
|
particle_t *(*R_TracerParticles)( float *org, float *vel, float life );
|
||||||
void (*R_TeleportSplash)( float *org );
|
void (*R_TeleportSplash)( const float *org );
|
||||||
void (*R_TempSphereModel)( float *pos, float speed, float life, int count, int modelIndex );
|
void (*R_TempSphereModel)( const float *pos, float speed, float life, int count, int modelIndex );
|
||||||
TEMPENTITY *(*R_TempModel)( float *pos, float *dir, float *angles, float life, int modelIndex, int soundtype );
|
TEMPENTITY *(*R_TempModel)( const float *pos, const float *dir, const float *angles, float life, int modelIndex, int soundtype );
|
||||||
TEMPENTITY *(*R_DefaultSprite)( float *pos, int spriteIndex, float framerate );
|
TEMPENTITY *(*R_DefaultSprite)( const float *pos, int spriteIndex, float framerate );
|
||||||
TEMPENTITY *(*R_TempSprite)( float *pos, float *dir, float scale, int modelIndex, int rendermode, int renderfx, float a, float life, int flags );
|
TEMPENTITY *(*R_TempSprite)( float *pos, const float *dir, float scale, int modelIndex, int rendermode, int renderfx, float a, float life, int flags );
|
||||||
int (*Draw_DecalIndex)( int id );
|
int (*Draw_DecalIndex)( int id );
|
||||||
int (*Draw_DecalIndexFromName)( char *name );
|
int (*Draw_DecalIndexFromName)( const char *name );
|
||||||
void (*R_DecalShoot)( int textureIndex, int entity, int modelIndex, float *position, int flags );
|
void (*R_DecalShoot)( int textureIndex, int entity, int modelIndex, float *position, int flags );
|
||||||
void (*R_AttachTentToPlayer)( int client, int modelIndex, float zoffset, float life );
|
void (*R_AttachTentToPlayer)( int client, int modelIndex, float zoffset, float life );
|
||||||
void (*R_KillAttachedTents)( int client );
|
void (*R_KillAttachedTents)( int client );
|
||||||
@@ -182,10 +182,10 @@ struct efx_api_s
|
|||||||
BEAM *(*R_BeamRing)( int startEnt, int endEnt, int modelIndex, float life, float width, float amplitude, float brightness, float speed, int startFrame, float framerate, float r, float g, float b );
|
BEAM *(*R_BeamRing)( int startEnt, int endEnt, int modelIndex, float life, float width, float amplitude, float brightness, float speed, int startFrame, float framerate, float r, float g, float b );
|
||||||
dlight_t *(*CL_AllocDlight)( int key );
|
dlight_t *(*CL_AllocDlight)( int key );
|
||||||
dlight_t *(*CL_AllocElight)( int key );
|
dlight_t *(*CL_AllocElight)( int key );
|
||||||
TEMPENTITY *(*CL_TempEntAlloc)( float *org, struct model_s *model );
|
TEMPENTITY *(*CL_TempEntAlloc)( const float *org, struct model_s *model );
|
||||||
TEMPENTITY *(*CL_TempEntAllocNoModel)( float *org );
|
TEMPENTITY *(*CL_TempEntAllocNoModel)( const float *org );
|
||||||
TEMPENTITY *(*CL_TempEntAllocHigh)( float *org, struct model_s *model );
|
TEMPENTITY *(*CL_TempEntAllocHigh)( const float *org, struct model_s *model );
|
||||||
TEMPENTITY *(*CL_TentEntAllocCustom)( float *origin, struct model_s *model, int high, void (*callback)( struct tempent_s *ent, float frametime, float currenttime ));
|
TEMPENTITY *(*CL_TentEntAllocCustom)( const float *origin, struct model_s *model, int high, void (*callback)( struct tempent_s *ent, float frametime, float currenttime ));
|
||||||
void (*R_GetPackedColor)( short *packed, short color );
|
void (*R_GetPackedColor)( short *packed, short color );
|
||||||
short (*R_LookupColor)( unsigned char r, unsigned char g, unsigned char b );
|
short (*R_LookupColor)( unsigned char r, unsigned char g, unsigned char b );
|
||||||
void (*R_DecalRemoveAll)( int textureIndex ); // textureIndex points to the decal index in the array, not the actual texture index.
|
void (*R_DecalRemoveAll)( int textureIndex ); // textureIndex points to the decal index in the array, not the actual texture index.
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ typedef struct engine_studio_api_s
|
|||||||
// Check to see if pointer is in the cache
|
// Check to see if pointer is in the cache
|
||||||
void *( *Cache_Check )( struct cache_user_s *c );
|
void *( *Cache_Check )( struct cache_user_s *c );
|
||||||
// Load file into cache ( can be swapped out on demand )
|
// Load file into cache ( can be swapped out on demand )
|
||||||
void ( *LoadCacheFile )( char *path, struct cache_user_s *cu );
|
void ( *LoadCacheFile )( const char *path, struct cache_user_s *cu );
|
||||||
// Retrieve model pointer for the named model
|
// Retrieve model pointer for the named model
|
||||||
struct model_s *( *Mod_ForName )( const char *name, int crash_if_missing );
|
struct model_s *( *Mod_ForName )( const char *name, int crash_if_missing );
|
||||||
// Retrieve pointer to studio model data block from a model
|
// Retrieve pointer to studio model data block from a model
|
||||||
@@ -120,7 +120,7 @@ typedef struct server_studio_api_s
|
|||||||
// Check to see if pointer is in the cache
|
// Check to see if pointer is in the cache
|
||||||
void *( *Cache_Check )( struct cache_user_s *c );
|
void *( *Cache_Check )( struct cache_user_s *c );
|
||||||
// Load file into cache ( can be swapped out on demand )
|
// Load file into cache ( can be swapped out on demand )
|
||||||
void ( *LoadCacheFile )( char *path, struct cache_user_s *cu );
|
void ( *LoadCacheFile )( const char *path, struct cache_user_s *cu );
|
||||||
// Retrieve pointer to studio model data block from a model
|
// Retrieve pointer to studio model data block from a model
|
||||||
void *( *Mod_Extradata )( struct model_s *mod );
|
void *( *Mod_Extradata )( struct model_s *mod );
|
||||||
} server_studio_api_t;
|
} server_studio_api_t;
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ typedef enum
|
|||||||
TF_KEEP_SOURCE = (1<<1), // some images keep source
|
TF_KEEP_SOURCE = (1<<1), // some images keep source
|
||||||
TF_NOFLIP_TGA = (1<<2), // Steam background completely ignore tga attribute 0x20
|
TF_NOFLIP_TGA = (1<<2), // Steam background completely ignore tga attribute 0x20
|
||||||
TF_EXPAND_SOURCE = (1<<3), // Don't keep source as 8-bit expand to RGBA
|
TF_EXPAND_SOURCE = (1<<3), // Don't keep source as 8-bit expand to RGBA
|
||||||
TF_ALLOW_EMBOSS = (1<<4), // Allow emboss-mapping for this image
|
// reserved
|
||||||
TF_RECTANGLE = (1<<5), // this is GL_TEXTURE_RECTANGLE
|
TF_RECTANGLE = (1<<5), // this is GL_TEXTURE_RECTANGLE
|
||||||
TF_CUBEMAP = (1<<6), // it's cubemap texture
|
TF_CUBEMAP = (1<<6), // it's cubemap texture
|
||||||
TF_DEPTHMAP = (1<<7), // custom texture filter used
|
TF_DEPTHMAP = (1<<7), // custom texture filter used
|
||||||
@@ -107,19 +107,24 @@ 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_ALLOW_NEAREST = (1<<30), // allows toggling nearest filtering for TF_NOMIPMAP textures
|
||||||
} texFlags_t;
|
} texFlags_t;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
CONTEXT_TYPE_GL = 0,
|
CONTEXT_TYPE_GL = 0, // compatibility profile
|
||||||
CONTEXT_TYPE_GLES_1_X,
|
CONTEXT_TYPE_GLES_1_X,
|
||||||
CONTEXT_TYPE_GLES_2_X
|
CONTEXT_TYPE_GLES_2_X,
|
||||||
|
CONTEXT_TYPE_GL_CORE
|
||||||
} gl_context_type_t;
|
} gl_context_type_t;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
GLES_WRAPPER_NONE = 0, // native GLES
|
GLES_WRAPPER_NONE = 0, // native GL
|
||||||
GLES_WRAPPER_NANOGL, // used on GLES platforms
|
GLES_WRAPPER_NANOGL, // used on GLES platforms
|
||||||
|
GLES_WRAPPER_WES, // used on GLES platforms
|
||||||
|
GLES_WRAPPER_GL4ES, // used on GLES platforms
|
||||||
} gles_wrapper_t;
|
} gles_wrapper_t;
|
||||||
|
|
||||||
// 30 bytes here
|
// 30 bytes here
|
||||||
@@ -152,10 +157,12 @@ typedef struct decallist_s
|
|||||||
modelstate_t studio_state; // studio decals only
|
modelstate_t studio_state; // studio decals only
|
||||||
} decallist_t;
|
} decallist_t;
|
||||||
|
|
||||||
|
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 );
|
||||||
@@ -175,9 +182,9 @@ typedef struct render_api_s
|
|||||||
const char* (*GL_TextureName)( unsigned int texnum );
|
const char* (*GL_TextureName)( unsigned int texnum );
|
||||||
const byte* (*GL_TextureData)( unsigned int texnum ); // may be NULL
|
const byte* (*GL_TextureData)( unsigned int texnum ); // may be NULL
|
||||||
int (*GL_LoadTexture)( const char *name, const byte *buf, size_t size, int flags );
|
int (*GL_LoadTexture)( const char *name, const byte *buf, size_t size, int flags );
|
||||||
int (*GL_CreateTexture)( const char *name, int width, int height, const void *buffer, int flags );
|
int (*GL_CreateTexture)( const char *name, int width, int height, const void *buffer, texFlags_t flags );
|
||||||
int (*GL_LoadTextureArray)( const char **names, int flags );
|
int (*GL_LoadTextureArray)( const char **names, int flags );
|
||||||
int (*GL_CreateTextureArray)( const char *name, int width, int height, int depth, const void *buffer, int flags );
|
int (*GL_CreateTextureArray)( const char *name, int width, int height, int depth, const void *buffer, texFlags_t flags );
|
||||||
void (*GL_FreeTexture)( unsigned int texnum );
|
void (*GL_FreeTexture)( unsigned int texnum );
|
||||||
|
|
||||||
// Decals manipulating (draw & remove)
|
// Decals manipulating (draw & remove)
|
||||||
@@ -187,9 +194,9 @@ typedef struct render_api_s
|
|||||||
|
|
||||||
// AVIkit support
|
// AVIkit support
|
||||||
void *(*AVI_LoadVideo)( const char *filename, qboolean load_audio );
|
void *(*AVI_LoadVideo)( const char *filename, qboolean load_audio );
|
||||||
int (*AVI_GetVideoInfo)( void *Avi, long *xres, long *yres, float *duration );
|
int (*AVI_GetVideoInfo)( void *Avi, int *xres, int *yres, float *duration ); // a1ba: changed longs to int
|
||||||
long (*AVI_GetVideoFrameNumber)( void *Avi, float time );
|
int (*AVI_GetVideoFrameNumber)( void *Avi, float time );
|
||||||
byte *(*AVI_GetVideoFrame)( void *Avi, long frame );
|
byte *(*AVI_GetVideoFrame)( void *Avi, int frame );
|
||||||
void (*AVI_UploadRawFrame)( int texture, int cols, int rows, int width, int height, const byte *data );
|
void (*AVI_UploadRawFrame)( int texture, int cols, int rows, int width, int height, const byte *data );
|
||||||
void (*AVI_FreeVideo)( void *Avi );
|
void (*AVI_FreeVideo)( void *Avi );
|
||||||
int (*AVI_IsActive)( void *Avi );
|
int (*AVI_IsActive)( void *Avi );
|
||||||
@@ -219,23 +226,24 @@ typedef struct render_api_s
|
|||||||
struct mstudiotex_s *( *StudioGetTexture )( struct cl_entity_s *e );
|
struct mstudiotex_s *( *StudioGetTexture )( struct cl_entity_s *e );
|
||||||
const struct ref_overview_s *( *GetOverviewParms )( void );
|
const struct ref_overview_s *( *GetOverviewParms )( void );
|
||||||
const char *( *GetFileByIndex )( int fileindex );
|
const char *( *GetFileByIndex )( int fileindex );
|
||||||
int (*pfnSaveFile)( const char *filename, const void *data, long len );
|
int (*pfnSaveFile)( const char *filename, const void *data, int len );
|
||||||
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)
|
||||||
char **(*pfnGetFilesList)( const char *pattern, int *numFiles, int gamedironly );
|
char **(*pfnGetFilesList)( const char *pattern, int *numFiles, int gamedironly );
|
||||||
unsigned long (*pfnFileBufferCRC32)( const void *buffer, const int length );
|
unsigned int (*pfnFileBufferCRC32)( const void *buffer, const int length );
|
||||||
int (*COM_CompareFileTime)( const char *filename1, const char *filename2, int *iCompare );
|
int (*COM_CompareFileTime)( const char *filename1, const char *filename2, int *iCompare );
|
||||||
void (*Host_Error)( const char *error, ... ); // cause Host Error
|
void (*Host_Error)( const char *error, ... ); // cause Host Error
|
||||||
void* ( *pfnGetModel )( int modelindex );
|
void* ( *pfnGetModel )( int modelindex );
|
||||||
float (*pfnTime)( void ); // Sys_DoubleTime
|
float (*pfnTime)( void ); // Sys_DoubleTime
|
||||||
void (*Cvar_Set)( char *name, char *value );
|
void (*Cvar_Set)( const char *name, const char *value );
|
||||||
void (*S_FadeMusicVolume)( float fadePercent ); // fade background track (0-100 percents)
|
void (*S_FadeMusicVolume)( float fadePercent ); // fade background track (0-100 percents)
|
||||||
void (*SetRandomSeed)( long lSeed ); // set custom seed for RANDOM_FLOAT\RANDOM_LONG for predictable random
|
// a1ba: changed long to int
|
||||||
|
void (*SetRandomSeed)( int lSeed ); // set custom seed for RANDOM_FLOAT\RANDOM_LONG for predictable random
|
||||||
// ONLY ADD NEW FUNCTIONS TO THE END OF THIS STRUCT. INTERFACE VERSION IS FROZEN AT 37
|
// ONLY ADD NEW FUNCTIONS TO THE END OF THIS STRUCT. INTERFACE VERSION IS FROZEN AT 37
|
||||||
} render_api_t;
|
} render_api_t;
|
||||||
|
|
||||||
@@ -254,7 +262,7 @@ typedef struct render_interface_s
|
|||||||
// clear decals by engine request (e.g. for demo recording or vid_restart)
|
// clear decals by engine request (e.g. for demo recording or vid_restart)
|
||||||
void (*R_ClearStudioDecals)( void );
|
void (*R_ClearStudioDecals)( void );
|
||||||
// grab r_speeds message
|
// grab r_speeds message
|
||||||
qboolean (*R_SpeedsMessage)( char *out, size_t size );
|
qboolean (*R_SpeedsMessage)( char *out, size_t size );
|
||||||
// alloc or destroy model custom data
|
// alloc or destroy model custom data
|
||||||
void (*Mod_ProcessUserData)( struct model_s *mod, qboolean create, const byte *buffer );
|
void (*Mod_ProcessUserData)( struct model_s *mod, qboolean create, const byte *buffer );
|
||||||
// alloc or destroy entity custom data
|
// alloc or destroy entity custom data
|
||||||
|
|||||||
@@ -12,16 +12,26 @@
|
|||||||
* without written permission from Valve LLC.
|
* without written permission from Valve LLC.
|
||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
|
#pragma once
|
||||||
#ifndef STUDIO_EVENT_H
|
#ifndef STUDIO_EVENT_H
|
||||||
#define STUDIO_EVENT_H
|
#define STUDIO_EVENT_H
|
||||||
|
|
||||||
|
#define MAXEVENTSTRING 64
|
||||||
|
|
||||||
typedef struct mstudioevent_s
|
typedef struct mstudioevent_s
|
||||||
{
|
{
|
||||||
int frame;
|
// the frame at which this animation event occurs
|
||||||
int event;
|
int32_t frame;
|
||||||
int type;
|
|
||||||
char options[64];
|
// the script event type
|
||||||
|
int32_t event;
|
||||||
|
|
||||||
|
// was "type"
|
||||||
|
int32_t unused;
|
||||||
|
|
||||||
|
// options
|
||||||
|
// could be path to sound WAVE files
|
||||||
|
char options[MAXEVENTSTRING];
|
||||||
} mstudioevent_t;
|
} mstudioevent_t;
|
||||||
|
|
||||||
#endif//STUDIO_EVENT_H
|
#endif // STUDIO_EVENT_H
|
||||||
|
|||||||
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
|
||||||
@@ -44,14 +44,14 @@ typedef struct triangleapi_s
|
|||||||
void (*Color4f)( float r, float g, float b, float a );
|
void (*Color4f)( float r, float g, float b, float a );
|
||||||
void (*Color4ub)( unsigned char r, unsigned char g, unsigned char b, unsigned char a );
|
void (*Color4ub)( unsigned char r, unsigned char g, unsigned char b, unsigned char a );
|
||||||
void (*TexCoord2f)( float u, float v );
|
void (*TexCoord2f)( float u, float v );
|
||||||
void (*Vertex3fv)( float *worldPnt );
|
void (*Vertex3fv)( const float *worldPnt );
|
||||||
void (*Vertex3f)( float x, float y, float z );
|
void (*Vertex3f)( float x, float y, float z );
|
||||||
void (*Brightness)( float brightness );
|
void (*Brightness)( float brightness );
|
||||||
void (*CullFace)( TRICULLSTYLE style );
|
void (*CullFace)( TRICULLSTYLE style );
|
||||||
int (*SpriteTexture)( struct model_s *pSpriteModel, int frame );
|
int (*SpriteTexture)( struct model_s *pSpriteModel, int frame );
|
||||||
int (*WorldToScreen)( float *world, float *screen ); // Returns 1 if it's z clipped
|
int (*WorldToScreen)( const float *world, float *screen ); // Returns 1 if it's z clipped
|
||||||
void (*Fog)( float flFogColor[3], float flStart, float flEnd, int bOn ); //Works just like GL_FOG, flFogColor is r/g/b.
|
void (*Fog)( float flFogColor[3], float flStart, float flEnd, int bOn ); //Works just like GL_FOG, flFogColor is r/g/b.
|
||||||
void (*ScreenToWorld)( float *screen, float *world );
|
void (*ScreenToWorld)( const float *screen, float *world );
|
||||||
void (*GetMatrix)( const int pname, float *matrix );
|
void (*GetMatrix)( const int pname, float *matrix );
|
||||||
int (*BoxInPVS)( float *mins, float *maxs );
|
int (*BoxInPVS)( float *mins, float *maxs );
|
||||||
void (*LightAtPoint)( float *pos, float *value );
|
void (*LightAtPoint)( float *pos, float *value );
|
||||||
|
|||||||
214
common/xash3d_types.h
Normal file
214
common/xash3d_types.h
Normal file
@@ -0,0 +1,214 @@
|
|||||||
|
// basic typedefs
|
||||||
|
#ifndef XASH_TYPES_H
|
||||||
|
#define XASH_TYPES_H
|
||||||
|
|
||||||
|
#include "build.h"
|
||||||
|
|
||||||
|
#if XASH_IRIX
|
||||||
|
#include <port.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if XASH_WIN32
|
||||||
|
#include <wchar.h> // off_t
|
||||||
|
#endif // _WIN32
|
||||||
|
|
||||||
|
#include <sys/types.h> // off_t
|
||||||
|
#include STDINT_H
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
typedef unsigned char byte;
|
||||||
|
typedef int sound_t;
|
||||||
|
typedef float vec_t;
|
||||||
|
typedef vec_t vec2_t[2];
|
||||||
|
typedef vec_t vec3_t[3];
|
||||||
|
typedef vec_t vec4_t[4];
|
||||||
|
typedef vec_t quat_t[4];
|
||||||
|
typedef byte rgba_t[4]; // unsigned byte colorpack
|
||||||
|
typedef byte rgb_t[3]; // unsigned byte colorpack
|
||||||
|
typedef vec_t matrix3x4[3][4];
|
||||||
|
typedef vec_t matrix4x4[4][4];
|
||||||
|
|
||||||
|
#if XASH_64BIT
|
||||||
|
typedef uint32_t poolhandle_t;
|
||||||
|
#else
|
||||||
|
typedef void* poolhandle_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#undef true
|
||||||
|
#undef false
|
||||||
|
|
||||||
|
#ifndef __cplusplus
|
||||||
|
typedef enum { false, true } qboolean;
|
||||||
|
#else
|
||||||
|
typedef int qboolean;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef uint64_t longtime_t;
|
||||||
|
|
||||||
|
#define MAX_STRING 256 // generic string
|
||||||
|
#define MAX_INFO_STRING 256 // infostrings are transmitted across network
|
||||||
|
#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_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_TOKEN 2048 // parse token length
|
||||||
|
#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 BIT( n ) ( 1U << ( n ))
|
||||||
|
#define BIT64( n ) ( 1ULL << ( n ))
|
||||||
|
#define SetBits( iBitVector, bits ) ((iBitVector) = (iBitVector) | (bits))
|
||||||
|
#define ClearBits( iBitVector, bits ) ((iBitVector) = (iBitVector) & ~(bits))
|
||||||
|
#define FBitSet( iBitVector, bit ) ((iBitVector) & (bit))
|
||||||
|
|
||||||
|
#ifndef __cplusplus
|
||||||
|
#ifdef NULL
|
||||||
|
#undef NULL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define NULL ((void *)0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// color strings
|
||||||
|
#define IsColorString( p ) ( p && *( p ) == '^' && *(( p ) + 1) && *(( p ) + 1) >= '0' && *(( p ) + 1 ) <= '9' )
|
||||||
|
#define ColorIndex( c ) ((( c ) - '0' ) & 7 )
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#ifdef __i386__
|
||||||
|
#define EXPORT __attribute__ ((visibility ("default"),force_align_arg_pointer))
|
||||||
|
#define GAME_EXPORT __attribute((force_align_arg_pointer))
|
||||||
|
#else
|
||||||
|
#define EXPORT __attribute__ ((visibility ("default")))
|
||||||
|
#define GAME_EXPORT
|
||||||
|
#endif
|
||||||
|
#define _format(x) __attribute__((format(printf, x, x+1)))
|
||||||
|
#define NORETURN __attribute__((noreturn))
|
||||||
|
#define NONNULL __attribute__((nonnull))
|
||||||
|
#define ALLOC_CHECK(x) __attribute__((alloc_size(x)))
|
||||||
|
#define FORCEINLINE inline __attribute__((always_inline))
|
||||||
|
#define NOINLINE __attribute__((noinline))
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
#define EXPORT __declspec( dllexport )
|
||||||
|
#define GAME_EXPORT
|
||||||
|
#define _format(x)
|
||||||
|
#define NORETURN
|
||||||
|
#define NONNULL
|
||||||
|
#define ALLOC_CHECK(x)
|
||||||
|
#define FORCEINLINE __forceinline
|
||||||
|
#define NOINLINE __declspec( noinline )
|
||||||
|
#else
|
||||||
|
#define EXPORT
|
||||||
|
#define GAME_EXPORT
|
||||||
|
#define _format(x)
|
||||||
|
#define NORETURN
|
||||||
|
#define NONNULL
|
||||||
|
#define ALLOC_CHECK(x)
|
||||||
|
#define FORCEINLINE
|
||||||
|
#define NOINLINE
|
||||||
|
#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 )
|
||||||
|
#define unlikely(x) __builtin_expect(x, 0)
|
||||||
|
#define likely(x) __builtin_expect(x, 1)
|
||||||
|
#else
|
||||||
|
#define unlikely(x) (x)
|
||||||
|
#define likely(x) (x)
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#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
|
||||||
|
|
||||||
|
#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 LittleLongSW(x) (x = LittleLong(x) )
|
||||||
|
#define LittleShort(x) ((short)( (((short)(x) >> 8) & 255) + (((short)(x) & 255) << 8)))
|
||||||
|
#define LittleShortSW(x) (x = LittleShort(x) )
|
||||||
|
_inline float LittleFloat( float f )
|
||||||
|
{
|
||||||
|
union
|
||||||
|
{
|
||||||
|
float f;
|
||||||
|
unsigned char b[4];
|
||||||
|
} dat1, dat2;
|
||||||
|
|
||||||
|
dat1.f = f;
|
||||||
|
dat2.b[0] = dat1.b[3];
|
||||||
|
dat2.b[1] = dat1.b[2];
|
||||||
|
dat2.b[2] = dat1.b[1];
|
||||||
|
dat2.b[3] = dat1.b[0];
|
||||||
|
|
||||||
|
return dat2.f;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#define LittleLong(x) (x)
|
||||||
|
#define LittleLongSW(x)
|
||||||
|
#define LittleShort(x) (x)
|
||||||
|
#define LittleShortSW(x)
|
||||||
|
#define LittleFloat(x) (x)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
typedef unsigned int dword;
|
||||||
|
typedef unsigned int uint;
|
||||||
|
typedef char string[MAX_STRING];
|
||||||
|
typedef struct file_s file_t; // normal file
|
||||||
|
typedef struct stream_s stream_t; // sound stream for background music playing
|
||||||
|
typedef off_t fs_offset_t;
|
||||||
|
#if XASH_WIN32
|
||||||
|
typedef int fs_size_t; // return type of _read, _write funcs
|
||||||
|
#else /* !XASH_WIN32 */
|
||||||
|
typedef ssize_t fs_size_t;
|
||||||
|
#endif /* !XASH_WIN32 */
|
||||||
|
|
||||||
|
typedef struct dllfunc_s
|
||||||
|
{
|
||||||
|
const char *name;
|
||||||
|
void **func;
|
||||||
|
} dllfunc_t;
|
||||||
|
|
||||||
|
typedef struct dll_info_s
|
||||||
|
{
|
||||||
|
const char *name; // name of library
|
||||||
|
const dllfunc_t *fcts; // list of dll exports
|
||||||
|
qboolean crash; // crash if dll not found
|
||||||
|
void *link; // hinstance of loading library
|
||||||
|
} dll_info_t;
|
||||||
|
|
||||||
|
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
|
||||||
|
// the server to all connected clients.
|
||||||
|
// each config string can be at most CS_SIZE characters.
|
||||||
|
#if XASH_LOW_MEMORY == 0
|
||||||
|
#define MAX_QPATH 64 // max length of a game pathname
|
||||||
|
#elif XASH_LOW_MEMORY == 2
|
||||||
|
#define MAX_QPATH 32 // should be enough for singleplayer
|
||||||
|
#elif XASH_LOW_MEMORY == 1
|
||||||
|
#define MAX_QPATH 48
|
||||||
|
#endif
|
||||||
|
#define MAX_OSPATH 260 // max length of a filesystem pathname
|
||||||
|
#define CS_SIZE 64 // size of one config string
|
||||||
|
#define CS_TIME 16 // size of time string
|
||||||
|
|
||||||
|
#endif // XASH_TYPES_H
|
||||||
@@ -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_ASSERT( sizeof( daliashdr_t ) == 84, "invalid daliashdr_t size" );
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int onseam;
|
int32_t onseam;
|
||||||
int s;
|
int32_t s;
|
||||||
int t;
|
int32_t t;
|
||||||
} stvert_t;
|
} stvert_t;
|
||||||
|
|
||||||
|
STATIC_ASSERT( sizeof( stvert_t ) == 12, "invalid stvert_t size" );
|
||||||
|
|
||||||
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_ASSERT( sizeof( dtriangle_t ) == 16, "invalid dtriangle_t size" );
|
||||||
|
|
||||||
#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_ASSERT( sizeof( daliasframe_t ) == 24, "invalid daliasframe_t size" );
|
||||||
|
|
||||||
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_ASSERT( sizeof( daliasgroup_t ) == 12, "invalid daliasgrou_t size" );
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int numskins;
|
int32_t numskins;
|
||||||
} daliasskingroup_t;
|
} daliasskingroup_t;
|
||||||
|
|
||||||
|
STATIC_ASSERT( sizeof( daliasskingroup_t ) == 4, "invalid daliasskingroup_t size" );
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
float interval;
|
float interval;
|
||||||
} daliasinterval_t;
|
} daliasinterval_t;
|
||||||
|
|
||||||
|
STATIC_ASSERT( sizeof( daliasinterval_t ) == 4, "invalid daliasinterval_t size" );
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
float interval;
|
float interval;
|
||||||
} daliasskininterval_t;
|
} daliasskininterval_t;
|
||||||
|
|
||||||
|
STATIC_ASSERT( sizeof( daliasskininterval_t ) == 4, "invalid daliasskininterval_t size" );
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
aliasframetype_t type;
|
uint32_t type; // was aliasframetype_t
|
||||||
} daliasframetype_t;
|
} daliasframetype_t;
|
||||||
|
|
||||||
|
STATIC_ASSERT( sizeof( daliasframetype_t ) == 4, "invalid daliasframetype_t size" );
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
aliasskintype_t type;
|
uint32_t type; // was aliasskintype_t
|
||||||
} daliasskintype_t;
|
} daliasskintype_t;
|
||||||
|
|
||||||
|
STATIC_ASSERT( sizeof( daliasskintype_t ) == 4, "invalid daliasskintype_t size" );
|
||||||
|
|
||||||
#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},
|
||||||
|
|||||||
@@ -15,6 +15,14 @@ GNU General Public License for more details.
|
|||||||
#ifndef CDLL_EXP_H
|
#ifndef CDLL_EXP_H
|
||||||
#define CDLL_EXP_H
|
#define CDLL_EXP_H
|
||||||
|
|
||||||
|
struct tempent_s;
|
||||||
|
struct usercmd_s;
|
||||||
|
struct physent_s;
|
||||||
|
struct playermove_s;
|
||||||
|
struct mstudioevent_s;
|
||||||
|
struct engine_studio_api_s;
|
||||||
|
struct r_studio_interface_s;
|
||||||
|
|
||||||
// NOTE: ordering is important!
|
// NOTE: ordering is important!
|
||||||
typedef struct cldll_func_s
|
typedef struct cldll_func_s
|
||||||
{
|
{
|
||||||
@@ -62,6 +70,10 @@ typedef struct cldll_func_s
|
|||||||
// Xash3D extension
|
// Xash3D extension
|
||||||
int (*pfnGetRenderInterface)( int version, render_api_t *renderfuncs, render_interface_t *callback );
|
int (*pfnGetRenderInterface)( int version, render_api_t *renderfuncs, render_interface_t *callback );
|
||||||
void (*pfnClipMoveToEntity)( struct physent_s *pe, const vec3_t start, vec3_t mins, vec3_t maxs, const vec3_t end, struct pmtrace_s *tr );
|
void (*pfnClipMoveToEntity)( struct physent_s *pe, const vec3_t start, vec3_t mins, vec3_t maxs, const vec3_t end, struct pmtrace_s *tr );
|
||||||
|
// Xash3D FWGS extension
|
||||||
|
int (*pfnTouchEvent)( int type, int fingerID, float x, float y, float dx, float dy );
|
||||||
|
void (*pfnMoveEvent)( float forwardmove, float sidemove );
|
||||||
|
void (*pfnLookEvent)( float relyaw, float relpitch );
|
||||||
} cldll_func_t;
|
} cldll_func_t;
|
||||||
|
|
||||||
#endif//CDLL_EXP_H
|
#endif//CDLL_EXP_H
|
||||||
@@ -27,6 +27,16 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "const.h"
|
#include "const.h"
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define MAX_ALIAS_NAME 32
|
||||||
|
|
||||||
|
typedef struct cmdalias_s
|
||||||
|
{
|
||||||
|
struct cmdalias_s *next;
|
||||||
|
char name[MAX_ALIAS_NAME];
|
||||||
|
char *value;
|
||||||
|
} cmdalias_t;
|
||||||
|
|
||||||
// this file is included by both the engine and the client-dll,
|
// this file is included by both the engine and the client-dll,
|
||||||
// so make sure engine declarations aren't done twice
|
// so make sure engine declarations aren't done twice
|
||||||
@@ -96,8 +106,14 @@ typedef struct hud_player_info_s
|
|||||||
char *model;
|
char *model;
|
||||||
short topcolor;
|
short topcolor;
|
||||||
short bottomcolor;
|
short bottomcolor;
|
||||||
|
|
||||||
|
uint64_t m_nSteamID;
|
||||||
} hud_player_info_t;
|
} hud_player_info_t;
|
||||||
|
|
||||||
|
struct screenfade_s;
|
||||||
|
struct tagPOINT;
|
||||||
|
struct event_args_s;
|
||||||
|
|
||||||
typedef struct cl_enginefuncs_s
|
typedef struct cl_enginefuncs_s
|
||||||
{
|
{
|
||||||
// sprite handlers
|
// sprite handlers
|
||||||
@@ -119,20 +135,20 @@ typedef struct cl_enginefuncs_s
|
|||||||
void (*pfnSetCrosshair)( HSPRITE hspr, wrect_t rc, int r, int g, int b );
|
void (*pfnSetCrosshair)( HSPRITE hspr, wrect_t rc, int r, int g, int b );
|
||||||
|
|
||||||
// cvar handlers
|
// cvar handlers
|
||||||
struct cvar_s *(*pfnRegisterVariable)( char *szName, char *szValue, int flags );
|
struct cvar_s *(*pfnRegisterVariable)( const char *szName, const char *szValue, int flags );
|
||||||
float (*pfnGetCvarFloat)( char *szName );
|
float (*pfnGetCvarFloat)( const char *szName );
|
||||||
char* (*pfnGetCvarString)( char *szName );
|
const char* (*pfnGetCvarString)( const char *szName );
|
||||||
|
|
||||||
// command handlers
|
// command handlers
|
||||||
int (*pfnAddCommand)( char *cmd_name, void (*function)(void) );
|
int (*pfnAddCommand)( const char *cmd_name, void (*function)(void) );
|
||||||
int (*pfnHookUserMsg)( char *szMsgName, pfnUserMsgHook pfn );
|
int (*pfnHookUserMsg)( const char *szMsgName, pfnUserMsgHook pfn );
|
||||||
int (*pfnServerCmd)( char *szCmdString );
|
int (*pfnServerCmd)( const char *szCmdString );
|
||||||
int (*pfnClientCmd)( char *szCmdString );
|
int (*pfnClientCmd)( const char *szCmdString );
|
||||||
|
|
||||||
void (*pfnGetPlayerInfo)( int ent_num, hud_player_info_t *pinfo );
|
void (*pfnGetPlayerInfo)( int ent_num, hud_player_info_t *pinfo );
|
||||||
|
|
||||||
// sound handlers
|
// sound handlers
|
||||||
void (*pfnPlaySoundByName)( char *szSound, float volume );
|
void (*pfnPlaySoundByName)( const char *szSound, float volume );
|
||||||
void (*pfnPlaySoundByIndex)( int iSound, float volume );
|
void (*pfnPlaySoundByIndex)( int iSound, float volume );
|
||||||
|
|
||||||
// vector helpers
|
// vector helpers
|
||||||
@@ -154,14 +170,14 @@ typedef struct cl_enginefuncs_s
|
|||||||
void (*GetViewAngles)( float * );
|
void (*GetViewAngles)( float * );
|
||||||
void (*SetViewAngles)( float * );
|
void (*SetViewAngles)( float * );
|
||||||
int (*GetMaxClients)( void );
|
int (*GetMaxClients)( void );
|
||||||
void (*Cvar_SetValue)( char *cvar, float value );
|
void (*Cvar_SetValue)( const char *cvar, float value );
|
||||||
|
|
||||||
int (*Cmd_Argc)( void );
|
int (*Cmd_Argc)( void );
|
||||||
char *(*Cmd_Argv)( int arg );
|
const char *(*Cmd_Argv)( int arg );
|
||||||
void (*Con_Printf)( char *fmt, ... );
|
void (*Con_Printf)( const char *fmt, ... );
|
||||||
void (*Con_DPrintf)( char *fmt, ... );
|
void (*Con_DPrintf)( const char *fmt, ... );
|
||||||
void (*Con_NPrintf)( int pos, char *fmt, ... );
|
void (*Con_NPrintf)( int pos, const char *fmt, ... );
|
||||||
void (*Con_NXPrintf)( struct con_nprint_s *info, char *fmt, ... );
|
void (*Con_NXPrintf)( struct con_nprint_s *info, const char *fmt, ... );
|
||||||
|
|
||||||
const char* (*PhysInfo_ValueForKey)( const char *key );
|
const char* (*PhysInfo_ValueForKey)( const char *key );
|
||||||
const char* (*ServerInfo_ValueForKey)( const char *key );
|
const char* (*ServerInfo_ValueForKey)( const char *key );
|
||||||
@@ -180,8 +196,8 @@ typedef struct cl_enginefuncs_s
|
|||||||
void (*V_CalcShake)( void );
|
void (*V_CalcShake)( void );
|
||||||
void (*V_ApplyShake)( float *origin, float *angles, float factor );
|
void (*V_ApplyShake)( float *origin, float *angles, float factor );
|
||||||
|
|
||||||
int (*PM_PointContents)( float *point, int *truecontents );
|
int (*PM_PointContents)( const float *point, int *truecontents );
|
||||||
int (*PM_WaterEntity)( float *p );
|
int (*PM_WaterEntity)( const float *p );
|
||||||
struct pmtrace_s *(*PM_TraceLine)( float *start, float *end, int flags, int usehull, int ignore_pe );
|
struct pmtrace_s *(*PM_TraceLine)( float *start, float *end, int flags, int usehull, int ignore_pe );
|
||||||
|
|
||||||
struct model_s *(*CL_LoadModel)( const char *modelname, int *index );
|
struct model_s *(*CL_LoadModel)( const char *modelname, int *index );
|
||||||
@@ -194,19 +210,20 @@ typedef struct cl_enginefuncs_s
|
|||||||
void (*pfnPlaybackEvent)( int flags, const struct edict_s *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 );
|
void (*pfnPlaybackEvent)( int flags, const struct edict_s *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 );
|
||||||
void (*pfnWeaponAnim)( int iAnim, int body );
|
void (*pfnWeaponAnim)( int iAnim, int body );
|
||||||
float (*pfnRandomFloat)( float flLow, float flHigh );
|
float (*pfnRandomFloat)( float flLow, float flHigh );
|
||||||
long (*pfnRandomLong)( long lLow, long lHigh );
|
int (*pfnRandomLong)( int lLow, int lHigh );
|
||||||
void (*pfnHookEvent)( char *name, void ( *pfnEvent )( struct event_args_s *args ));
|
void (*pfnHookEvent)( const char *name, void ( *pfnEvent )( struct event_args_s *args ));
|
||||||
int (*Con_IsVisible) ();
|
|
||||||
|
int (*Con_IsVisible) ( void );
|
||||||
const char *(*pfnGetGameDirectory)( void );
|
const char *(*pfnGetGameDirectory)( void );
|
||||||
struct cvar_s *(*pfnGetCvarPointer)( const char *szName );
|
struct cvar_s *(*pfnGetCvarPointer)( const char *szName );
|
||||||
const char *(*Key_LookupBinding)( const char *pBinding );
|
const char *(*Key_LookupBinding)( const char *pBinding );
|
||||||
const char *(*pfnGetLevelName)( void );
|
const char *(*pfnGetLevelName)( void );
|
||||||
void (*pfnGetScreenFade)( struct screenfade_s *fade );
|
void (*pfnGetScreenFade)( struct screenfade_s *fade );
|
||||||
void (*pfnSetScreenFade)( struct screenfade_s *fade );
|
void (*pfnSetScreenFade)( struct screenfade_s *fade );
|
||||||
void* (*VGui_GetPanel)( );
|
void* (*VGui_GetPanel)( void );
|
||||||
void (*VGui_ViewportPaintBackground)( int extents[4] );
|
void (*VGui_ViewportPaintBackground)( int extents[4] );
|
||||||
|
|
||||||
byte* (*COM_LoadFile)( char *path, int usehunk, int *pLength );
|
byte* (*COM_LoadFile)( const char *path, int usehunk, int *pLength );
|
||||||
char* (*COM_ParseFile)( char *data, char *token );
|
char* (*COM_ParseFile)( char *data, char *token );
|
||||||
void (*COM_FreeFile)( void *buffer );
|
void (*COM_FreeFile)( void *buffer );
|
||||||
|
|
||||||
@@ -248,39 +265,47 @@ typedef struct cl_enginefuncs_s
|
|||||||
void (*pfnGetMousePos)( struct tagPOINT *ppt );
|
void (*pfnGetMousePos)( struct tagPOINT *ppt );
|
||||||
void (*pfnSetMousePos)( int x, int y );
|
void (*pfnSetMousePos)( int x, int y );
|
||||||
void (*pfnSetMouseEnable)( qboolean fEnable );
|
void (*pfnSetMouseEnable)( qboolean fEnable );
|
||||||
void (*pfnUnused1)( void );
|
|
||||||
void (*pfnUnused2)( void );
|
// undocumented interface starts here
|
||||||
void (*pfnUnused3)( void );
|
struct cvar_s* (*pfnGetFirstCvarPtr)( void );
|
||||||
void (*pfnUnused4)( void );
|
void* (*pfnGetFirstCmdFunctionHandle)( void );
|
||||||
float (*pfnGetClientOldTime)( void );
|
void* (*pfnGetNextCmdFunctionHandle)( void *cmdhandle );
|
||||||
float (*pfnGetGravity)( void );
|
const char* (*pfnGetCmdFunctionName)( void *cmdhandle );
|
||||||
struct model_s*(*pfnGetModelByIndex)( int index );
|
float (*pfnGetClientOldTime)( void );
|
||||||
void (*pfnUnused5)( void );
|
float (*pfnGetGravity)( void );
|
||||||
void (*pfnUnused6)( void );
|
struct model_s* (*pfnGetModelByIndex)( int index );
|
||||||
void (*pfnUnused7)( void );
|
void (*pfnSetFilterMode)( int mode ); // same as gl_texsort in original Quake
|
||||||
void (*pfnUnused8)( void );
|
void (*pfnSetFilterColor)( float red, float green, float blue );
|
||||||
void (*pfnUnused9)( void );
|
void (*pfnSetFilterBrightness)( float brightness );
|
||||||
void (*pfnUnused10)( void );
|
void *(*pfnSequenceGet)( const char *fileName, const char *entryName );
|
||||||
void (*pfnUnused11)( void );
|
void (*pfnSPR_DrawGeneric)( int frame, int x, int y, const wrect_t *prc, int blendsrc, int blenddst, int width, int height );
|
||||||
void (*pfnUnused12)( void );
|
void *(*pfnSequencePickSentence)( const char *groupName, int pickMethod, int *entryPicked );
|
||||||
const char*(*LocalPlayerInfo_ValueForKey)( const char* key );
|
int (*pfnDrawString)( int x, int y, const char *str, int r, int g, int b );
|
||||||
void (*pfnUnused13)( void );
|
int (*pfnDrawStringReverse)( int x, int y, const char *str, int r, int g, int b );
|
||||||
void (*pfnUnused14)( void );
|
const char *(*LocalPlayerInfo_ValueForKey)( const char* key );
|
||||||
void (*pfnUnused15)( void );
|
int (*pfnVGUI2DrawCharacter)( int x, int y, int ch, unsigned int font );
|
||||||
void (*pfnUnused16)( void );
|
int (*pfnVGUI2DrawCharacterAdditive)( int x, int y, int ch, int r, int g, int b, unsigned int font );
|
||||||
void (*Cvar_Set)( char *name, char *value );
|
unsigned int (*pfnGetApproxWavePlayLen)( const char *filename );
|
||||||
void (*pfnUnused17)( void );
|
void* (*GetCareerGameUI)( void ); // g-cont. !!!! potential crash-point!
|
||||||
void (*pfnUnused18)( void );
|
void (*Cvar_Set)( const char *name, const char *value );
|
||||||
void (*pfnUnused19)( void );
|
int (*pfnIsPlayingCareerMatch)( void );
|
||||||
double (*pfnSys_FloatTime)( void );
|
void (*pfnPlaySoundVoiceByName)( char *szSound, float volume, int pitch );
|
||||||
void (*pfnUnused20)( void );
|
void (*pfnPrimeMusicStream)( char *filename, int looping );
|
||||||
void (*pfnUnused21)( void );
|
double (*pfnSys_FloatTime)( void );
|
||||||
void (*pfnUnused22)( void );
|
|
||||||
void (*pfnUnused23)( void );
|
// decay funcs
|
||||||
void (*pfnFillRGBABlend)( int x, int y, int width, int height, int r, int g, int b, int a );
|
void (*pfnProcessTutorMessageDecayBuffer)( int *buffer, int buflen );
|
||||||
int (*pfnGetAppID)( void );
|
void (*pfnConstructTutorMessageDecayBuffer)( int *buffer, int buflen );
|
||||||
void (*pfnUnused24)( void );
|
void (*pfnResetTutorMessageDecayData)( void );
|
||||||
void (*pfnUnused25)( void );
|
|
||||||
|
void (*pfnPlaySoundByNameAtPitch)( char *szSound, float volume, int pitch );
|
||||||
|
void (*pfnFillRGBABlend)( int x, int y, int width, int height, int r, int g, int b, int a );
|
||||||
|
int (*pfnGetAppID)( void );
|
||||||
|
cmdalias_t *(*pfnGetAliases)( void );
|
||||||
|
void (*pfnVguiWrap2_GetMouseDelta)( int *x, int *y );
|
||||||
|
|
||||||
|
// added in 2019 update, not documented yet
|
||||||
|
int (*pfnFilteredClientCmd)( const char *cmd );
|
||||||
} cl_enginefunc_t;
|
} cl_enginefunc_t;
|
||||||
|
|
||||||
#define CLDLL_INTERFACE_VERSION 7
|
#define CLDLL_INTERFACE_VERSION 7
|
||||||
|
|||||||
37
engine/client/avi/avi.h
Normal file
37
engine/client/avi/avi.h
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
avi.h -- common avi support header
|
||||||
|
Copyright (C) 2018 a1batross, Uncle Mike
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
#ifndef AVI_H
|
||||||
|
#define AVI_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// avikit.c
|
||||||
|
//
|
||||||
|
typedef struct movie_state_s movie_state_t;
|
||||||
|
int AVI_GetVideoFrameNumber( movie_state_t *Avi, float time );
|
||||||
|
byte *AVI_GetVideoFrame( movie_state_t *Avi, int frame );
|
||||||
|
qboolean AVI_GetVideoInfo( movie_state_t *Avi, int *xres, int *yres, float *duration );
|
||||||
|
qboolean AVI_GetAudioInfo( movie_state_t *Avi, wavdata_t *snd_info );
|
||||||
|
int AVI_GetAudioChunk( movie_state_t *Avi, char *audiodata, int offset, int length );
|
||||||
|
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 );
|
||||||
|
int AVI_TimeToSoundPosition( movie_state_t *Avi, int time );
|
||||||
|
void AVI_CloseVideo( movie_state_t *Avi );
|
||||||
|
qboolean AVI_IsActive( movie_state_t *Avi );
|
||||||
|
void AVI_FreeVideo( movie_state_t *Avi );
|
||||||
|
movie_state_t *AVI_GetState( int num );
|
||||||
|
qboolean AVI_Initailize( void );
|
||||||
|
void AVI_Shutdown( void );
|
||||||
|
|
||||||
|
#endif // AVI_H
|
||||||
90
engine/client/avi/avi_stub.c
Normal file
90
engine/client/avi/avi_stub.c
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
/*
|
||||||
|
avi_stub.c - playing AVI files (stub)
|
||||||
|
Copyright (C) 2018 a1batross
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "build.h"
|
||||||
|
#if !XASH_WIN32
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
int AVI_GetVideoFrameNumber( movie_state_t *Avi, float time )
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
byte *AVI_GetVideoFrame( movie_state_t *Avi, int frame )
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
qboolean AVI_GetVideoInfo( movie_state_t *Avi, int *xres, int *yres, float *duration )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
qboolean AVI_GetAudioInfo( movie_state_t *Avi, wavdata_t *snd_info )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int AVI_GetAudioChunk( movie_state_t *Avi, char *audiodata, int offset, int length )
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
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 )
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int AVI_TimeToSoundPosition( movie_state_t *Avi, int time )
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AVI_CloseVideo( movie_state_t *Avi )
|
||||||
|
{
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
qboolean AVI_IsActive( movie_state_t *Avi )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AVI_FreeVideo( movie_state_t *Avi )
|
||||||
|
{
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
movie_state_t *AVI_GetState( int num )
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
qboolean AVI_Initailize( void )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AVI_Shutdown( void )
|
||||||
|
{
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // WIN32
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
avikit.c - playing AVI files (based on original AVIKit code)
|
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
|
||||||
@@ -13,9 +14,10 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "build.h"
|
||||||
|
#if XASH_WIN32
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "gl_local.h"
|
|
||||||
#include <vfw.h> // video for windows
|
#include <vfw.h> // video for windows
|
||||||
|
|
||||||
// msvfw32.dll exports
|
// msvfw32.dll exports
|
||||||
@@ -58,14 +60,14 @@ dll_info_t msacm_dll = { "msacm32.dll", msacm_funcs, false };
|
|||||||
static int (_stdcall *pAVIStreamInfo)( PAVISTREAM pavi, AVISTREAMINFO *psi, LONG lSize );
|
static int (_stdcall *pAVIStreamInfo)( PAVISTREAM pavi, AVISTREAMINFO *psi, LONG lSize );
|
||||||
static int (_stdcall *pAVIStreamRead)( PAVISTREAM pavi, LONG lStart, LONG lSamples, void *lpBuffer, LONG cbBuffer, LONG *plBytes, LONG *plSamples );
|
static int (_stdcall *pAVIStreamRead)( PAVISTREAM pavi, LONG lStart, LONG lSamples, void *lpBuffer, LONG cbBuffer, LONG *plBytes, LONG *plSamples );
|
||||||
static PGETFRAME (_stdcall *pAVIStreamGetFrameOpen)( PAVISTREAM pavi, LPBITMAPINFOHEADER lpbiWanted );
|
static PGETFRAME (_stdcall *pAVIStreamGetFrameOpen)( PAVISTREAM pavi, LPBITMAPINFOHEADER lpbiWanted );
|
||||||
static long (_stdcall *pAVIStreamTimeToSample)( PAVISTREAM pavi, LONG lTime );
|
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 long (_stdcall *pAVIStreamStart)( PAVISTREAM pavi );
|
static int (_stdcall *pAVIStreamStart)( PAVISTREAM pavi );
|
||||||
static dword (_stdcall *pAVIFileRelease)( PAVIFILE pfile );
|
static dword (_stdcall *pAVIFileRelease)( PAVIFILE pfile );
|
||||||
static void (_stdcall *pAVIFileInit)( void );
|
static void (_stdcall *pAVIFileInit)( void );
|
||||||
static void (_stdcall *pAVIFileExit)( void );
|
static void (_stdcall *pAVIFileExit)( void );
|
||||||
@@ -75,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 },
|
||||||
@@ -99,17 +101,17 @@ typedef struct movie_state_s
|
|||||||
PAVIFILE pfile; // avi file pointer
|
PAVIFILE pfile; // avi file pointer
|
||||||
PAVISTREAM video_stream; // video stream pointer
|
PAVISTREAM video_stream; // video stream pointer
|
||||||
PGETFRAME video_getframe; // pointer to getframe object for video stream
|
PGETFRAME video_getframe; // pointer to getframe object for video stream
|
||||||
long video_frames; // total frames
|
int video_frames; // total frames
|
||||||
long video_xres; // video stream resolution
|
int video_xres; // video stream resolution
|
||||||
long video_yres;
|
int video_yres;
|
||||||
float video_fps; // video stream fps
|
float video_fps; // video stream fps
|
||||||
|
|
||||||
PAVISTREAM audio_stream; // audio stream pointer
|
PAVISTREAM audio_stream; // audio stream pointer
|
||||||
WAVEFORMAT *audio_header; // audio stream header
|
WAVEFORMAT *audio_header; // audio stream header
|
||||||
long audio_header_size; // WAVEFORMAT is returned for PCM data; WAVEFORMATEX for others
|
int audio_header_size; // WAVEFORMAT is returned for PCM data; WAVEFORMATEX for others
|
||||||
long audio_codec; // WAVE_FORMAT_PCM is oldstyle: anything else needs conversion
|
int audio_codec; // WAVE_FORMAT_PCM is oldstyle: anything else needs conversion
|
||||||
long audio_length; // in converted samples
|
int audio_length; // in converted samples
|
||||||
long audio_bytes_per_sample; // guess.
|
int audio_bytes_per_sample; // guess.
|
||||||
|
|
||||||
// compressed audio specific data
|
// compressed audio specific data
|
||||||
dword cpa_blockalign; // block size to read
|
dword cpa_blockalign; // block size to read
|
||||||
@@ -251,7 +253,7 @@ qboolean AVI_ACMConvertAudio( movie_state_t *Avi )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qboolean AVI_GetVideoInfo( movie_state_t *Avi, long *xres, long *yres, float *duration )
|
qboolean AVI_GetVideoInfo( movie_state_t *Avi, int *xres, int *yres, float *duration )
|
||||||
{
|
{
|
||||||
if( !Avi->active )
|
if( !Avi->active )
|
||||||
return false;
|
return false;
|
||||||
@@ -269,7 +271,7 @@ qboolean AVI_GetVideoInfo( movie_state_t *Avi, long *xres, long *yres, float *du
|
|||||||
}
|
}
|
||||||
|
|
||||||
// returns a unique frame identifier
|
// returns a unique frame identifier
|
||||||
long AVI_GetVideoFrameNumber( movie_state_t *Avi, float time )
|
int AVI_GetVideoFrameNumber( movie_state_t *Avi, float time )
|
||||||
{
|
{
|
||||||
if( !Avi->active )
|
if( !Avi->active )
|
||||||
return 0;
|
return 0;
|
||||||
@@ -277,15 +279,7 @@ long AVI_GetVideoFrameNumber( movie_state_t *Avi, float time )
|
|||||||
return (time * Avi->video_fps);
|
return (time * Avi->video_fps);
|
||||||
}
|
}
|
||||||
|
|
||||||
long AVI_GetVideoFrameCount( movie_state_t *Avi )
|
int AVI_TimeToSoundPosition( movie_state_t *Avi, int time )
|
||||||
{
|
|
||||||
if( !Avi->active )
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return Avi->video_frames;
|
|
||||||
}
|
|
||||||
|
|
||||||
long AVI_TimeToSoundPosition( movie_state_t *Avi, long time )
|
|
||||||
{
|
{
|
||||||
if( !Avi->active || !Avi->audio_stream )
|
if( !Avi->active || !Avi->audio_stream )
|
||||||
return 0;
|
return 0;
|
||||||
@@ -295,7 +289,7 @@ long AVI_TimeToSoundPosition( movie_state_t *Avi, long time )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// gets the raw frame data
|
// gets the raw frame data
|
||||||
byte *AVI_GetVideoFrame( movie_state_t *Avi, long frame )
|
byte *AVI_GetVideoFrame( movie_state_t *Avi, int frame )
|
||||||
{
|
{
|
||||||
LPBITMAPINFOHEADER frame_info;
|
LPBITMAPINFOHEADER frame_info;
|
||||||
byte *frame_raw;
|
byte *frame_raw;
|
||||||
@@ -382,9 +376,9 @@ qboolean AVI_SeekPosition( movie_state_t *Avi, dword offset )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get a chunk of audio from the stream (in bytes)
|
// get a chunk of audio from the stream (in bytes)
|
||||||
long AVI_GetAudioChunk( movie_state_t *Avi, char *audiodata, long offset, long length )
|
int AVI_GetAudioChunk( movie_state_t *Avi, char *audiodata, int offset, int length )
|
||||||
{
|
{
|
||||||
long result = 0;
|
int result = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
// zero data past the end of the file
|
// zero data past the end of the file
|
||||||
@@ -392,7 +386,7 @@ long AVI_GetAudioChunk( movie_state_t *Avi, char *audiodata, long offset, long l
|
|||||||
{
|
{
|
||||||
if( offset <= Avi->audio_length )
|
if( offset <= Avi->audio_length )
|
||||||
{
|
{
|
||||||
long remaining_length = Avi->audio_length - offset;
|
int remaining_length = Avi->audio_length - offset;
|
||||||
|
|
||||||
AVI_GetAudioChunk( Avi, audiodata, offset, remaining_length );
|
AVI_GetAudioChunk( Avi, audiodata, offset, remaining_length );
|
||||||
|
|
||||||
@@ -427,7 +421,7 @@ long AVI_GetAudioChunk( movie_state_t *Avi, char *audiodata, long offset, long l
|
|||||||
|
|
||||||
while( length > 0 )
|
while( length > 0 )
|
||||||
{
|
{
|
||||||
long blockread = Avi->cpa_conversion_header.cbDstLengthUsed - Avi->cpa_blockpos;
|
int blockread = Avi->cpa_conversion_header.cbDstLengthUsed - Avi->cpa_blockpos;
|
||||||
|
|
||||||
if( blockread <= 0 ) // read next
|
if( blockread <= 0 ) // read next
|
||||||
{
|
{
|
||||||
@@ -490,8 +484,9 @@ void AVI_OpenVideo( movie_state_t *Avi, const char *filename, qboolean load_audi
|
|||||||
{
|
{
|
||||||
BITMAPINFOHEADER bmih;
|
BITMAPINFOHEADER bmih;
|
||||||
AVISTREAMINFO stream_info;
|
AVISTREAMINFO stream_info;
|
||||||
long 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;
|
||||||
@@ -500,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:
|
||||||
{
|
{
|
||||||
@@ -557,7 +559,7 @@ void AVI_OpenVideo( movie_state_t *Avi, const char *filename, qboolean load_audi
|
|||||||
}
|
}
|
||||||
else if( stream_info.fccType == streamtypeAUDIO && Avi->audio_stream == NULL && load_audio )
|
else if( stream_info.fccType == streamtypeAUDIO && Avi->audio_stream == NULL && load_audio )
|
||||||
{
|
{
|
||||||
long size;
|
int size;
|
||||||
|
|
||||||
Avi->audio_stream = stream;
|
Avi->audio_stream = stream;
|
||||||
|
|
||||||
@@ -570,7 +572,7 @@ void AVI_OpenVideo( movie_state_t *Avi, const char *filename, qboolean load_audi
|
|||||||
Avi->audio_codec = Avi->audio_header->wFormatTag;
|
Avi->audio_codec = Avi->audio_header->wFormatTag;
|
||||||
|
|
||||||
// length of converted audio in samples
|
// length of converted audio in samples
|
||||||
Avi->audio_length = (long)((float)stream_info.dwLength / Avi->audio_header->nAvgBytesPerSec );
|
Avi->audio_length = (int)((float)stream_info.dwLength / Avi->audio_header->nAvgBytesPerSec );
|
||||||
Avi->audio_length *= Avi->audio_header->nSamplesPerSec;
|
Avi->audio_length *= Avi->audio_header->nSamplesPerSec;
|
||||||
|
|
||||||
if( Avi->audio_codec != WAVE_FORMAT_PCM )
|
if( Avi->audio_codec != WAVE_FORMAT_PCM )
|
||||||
@@ -656,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 )
|
||||||
@@ -730,3 +732,4 @@ void AVI_Shutdown( void )
|
|||||||
Sys_FreeLibrary( &msacm_dll );
|
Sys_FreeLibrary( &msacm_dll );
|
||||||
avi_initialized = false;
|
avi_initialized = false;
|
||||||
}
|
}
|
||||||
|
#endif // _WIN32
|
||||||
@@ -15,7 +15,6 @@ GNU General Public License for more details.
|
|||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "gl_local.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
====================
|
====================
|
||||||
@@ -86,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 ))
|
||||||
@@ -97,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 );
|
||||||
@@ -127,7 +138,7 @@ void CL_PlayCDTrack_f( void )
|
|||||||
int i, maxTrack;
|
int i, maxTrack;
|
||||||
|
|
||||||
for( maxTrack = i = 0; i < MAX_CDTRACKS; i++ )
|
for( maxTrack = i = 0; i < MAX_CDTRACKS; i++ )
|
||||||
if( Q_strlen( clgame.cdtracks[i] )) maxTrack++;
|
if( COM_CheckStringEmpty( clgame.cdtracks[i] ) ) maxTrack++;
|
||||||
|
|
||||||
Con_Printf( "%u tracks\n", maxTrack );
|
Con_Printf( "%u tracks\n", maxTrack );
|
||||||
if( track )
|
if( track )
|
||||||
@@ -146,56 +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 )
|
||||||
{
|
{
|
||||||
int a, b, c, d;
|
|
||||||
|
|
||||||
if( lastnum < 0 || lastnum > 9999 )
|
if( lastnum < 0 || lastnum > 9999 )
|
||||||
{
|
|
||||||
Con_Printf( S_ERROR "unable to write screenshot\n" );
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
a = lastnum / 1000;
|
return Q_snprintf( filename, size, fmt, clgame.mapname, lastnum ) > 0;
|
||||||
lastnum -= a * 1000;
|
|
||||||
b = lastnum / 100;
|
|
||||||
lastnum -= b * 100;
|
|
||||||
c = lastnum / 10;
|
|
||||||
lastnum -= c * 10;
|
|
||||||
d = lastnum;
|
|
||||||
|
|
||||||
Q_sprintf( filename, "scrshots/%s_shot%i%i%i%i.bmp", clgame.mapname, a, b, c, d );
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
==================
|
|
||||||
CL_SnapshotGetName
|
|
||||||
==================
|
|
||||||
*/
|
|
||||||
qboolean CL_SnapshotGetName( int lastnum, char *filename )
|
|
||||||
{
|
|
||||||
int a, b, c, d;
|
|
||||||
|
|
||||||
if( lastnum < 0 || lastnum > 9999 )
|
|
||||||
{
|
|
||||||
Con_Printf( S_ERROR "unable to write snapshot\n" );
|
|
||||||
FS_AllowDirectPaths( false );
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
a = lastnum / 1000;
|
|
||||||
lastnum -= a * 1000;
|
|
||||||
b = lastnum / 100;
|
|
||||||
lastnum -= b * 100;
|
|
||||||
c = lastnum / 10;
|
|
||||||
lastnum -= c * 10;
|
|
||||||
d = lastnum;
|
|
||||||
|
|
||||||
Q_sprintf( filename, "../%s_%i%i%i%i.bmp", clgame.mapname, a, b, c, d );
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -205,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
|
||||||
@@ -344,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, glState.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
|
||||||
@@ -353,7 +200,8 @@ void CL_LevelShot_f( void )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Q_sprintf( cls.shotname, "levelshots/%s_%s.bmp", clgame.mapname, glState.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 );
|
||||||
@@ -366,23 +214,100 @@ 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, "%s%s.bmp", DEFAULT_SAVE_DIRECTORY, 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;
|
||||||
|
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -424,53 +349,7 @@ void CL_SetSky_f( void )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
R_SetupSky( Cmd_Argv( 1 ));
|
ref.dllFuncs.R_SetupSky( Cmd_Argv( 1 ));
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
================
|
|
||||||
SCR_TimeRefresh_f
|
|
||||||
|
|
||||||
timerefresh [noflip]
|
|
||||||
================
|
|
||||||
*/
|
|
||||||
void SCR_TimeRefresh_f( void )
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
double start, stop;
|
|
||||||
double time;
|
|
||||||
|
|
||||||
if( cls.state != ca_active )
|
|
||||||
return;
|
|
||||||
|
|
||||||
start = Sys_DoubleTime();
|
|
||||||
|
|
||||||
// run without page flipping like GoldSrc
|
|
||||||
if( Cmd_Argc() == 1 )
|
|
||||||
{
|
|
||||||
pglDrawBuffer( GL_FRONT );
|
|
||||||
for( i = 0; i < 128; i++ )
|
|
||||||
{
|
|
||||||
RI.viewangles[1] = i / 128.0 * 360.0f;
|
|
||||||
R_RenderScene();
|
|
||||||
}
|
|
||||||
pglFinish();
|
|
||||||
R_EndFrame();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for( i = 0; i < 128; i++ )
|
|
||||||
{
|
|
||||||
R_BeginFrame( true );
|
|
||||||
RI.viewangles[1] = i / 128.0 * 360.0f;
|
|
||||||
R_RenderScene();
|
|
||||||
R_EndFrame();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stop = Sys_DoubleTime ();
|
|
||||||
time = (stop - start);
|
|
||||||
Con_Printf( "%f seconds (%f fps)\n", time, 128 / time );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -482,6 +361,35 @@ viewpos (level-designer helper)
|
|||||||
*/
|
*/
|
||||||
void SCR_Viewpos_f( void )
|
void SCR_Viewpos_f( void )
|
||||||
{
|
{
|
||||||
Con_Printf( "org ( %g %g %g )\n", RI.vieworg[0], RI.vieworg[1], RI.vieworg[2] );
|
Con_Printf( "org ( %g %g %g )\n", refState.vieworg[0], refState.vieworg[1], refState.vieworg[2] );
|
||||||
Con_Printf( "ang ( %g %g %g )\n", RI.viewangles[0], RI.viewangles[1], RI.viewangles[2] );
|
Con_Printf( "ang ( %g %g %g )\n", refState.viewangles[0], refState.viewangles[1], refState.viewangles[2] );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
=============
|
||||||
|
CL_WavePlayLen_f
|
||||||
|
|
||||||
|
=============
|
||||||
|
*/
|
||||||
|
void CL_WavePlayLen_f( void )
|
||||||
|
{
|
||||||
|
const char *name;
|
||||||
|
uint msecs;
|
||||||
|
|
||||||
|
if( Cmd_Argc() != 2 )
|
||||||
|
{
|
||||||
|
Con_Printf( "waveplaylen <wave file name>: returns approximate number of milliseconds a wave file will take to play.\n" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
name = Cmd_Argv( 1 );
|
||||||
|
msecs = Sound_GetApproxWavePlayLen( name );
|
||||||
|
|
||||||
|
if( msecs == 0 )
|
||||||
|
{
|
||||||
|
Con_Printf( "Unable to read %s, file may be missing or incorrectly formatted.\n", name );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Con_Printf( "Play time is approximately %dms\n", msecs );
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,7 @@ qboolean CL_CheckFile( sizebuf_t *msg, resource_t *pResource )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( pResource->type == t_sound )
|
if( pResource->type == t_sound )
|
||||||
Q_strncpy( filepath, va( "%s%s", DEFAULT_SOUNDPATH, pResource->szFileName ), sizeof( filepath ));
|
Q_snprintf( filepath, sizeof( filepath ), DEFAULT_SOUNDPATH "%s", pResource->szFileName );
|
||||||
else Q_strncpy( filepath, pResource->szFileName, sizeof( filepath ));
|
else Q_strncpy( filepath, pResource->szFileName, sizeof( filepath ));
|
||||||
|
|
||||||
if( !COM_IsSafeFileToDownload( filepath ))
|
if( !COM_IsSafeFileToDownload( filepath ))
|
||||||
@@ -70,8 +70,15 @@ qboolean CL_CheckFile( sizebuf_t *msg, resource_t *pResource )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( cl.downloadUrl[0] )
|
||||||
|
{
|
||||||
|
HTTP_AddDownload( filepath, pResource->nDownloadSize, true );
|
||||||
|
host.downloadcount++;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
MSG_BeginClientCmd( msg, clc_stringcmd );
|
MSG_BeginClientCmd( msg, clc_stringcmd );
|
||||||
MSG_WriteString( msg, va( "dlfile %s", filepath ));
|
MSG_WriteStringf( msg, "dlfile %s", filepath );
|
||||||
host.downloadcount++;
|
host.downloadcount++;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -99,7 +106,7 @@ 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 CL_RemoveFromResourceList\n" );
|
||||||
|
|
||||||
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" );
|
||||||
|
|
||||||
pResource->pPrev->pNext = pResource->pNext;
|
pResource->pPrev->pNext = pResource->pNext;
|
||||||
@@ -120,7 +127,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;
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ GNU General Public License for more details.
|
|||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "net_encode.h"
|
#include "net_encode.h"
|
||||||
#include "particledef.h"
|
#include "particledef.h"
|
||||||
#include "gl_local.h"
|
|
||||||
#include "cl_tent.h"
|
#include "cl_tent.h"
|
||||||
#include "shake.h"
|
#include "shake.h"
|
||||||
#include "hltv.h"
|
#include "hltv.h"
|
||||||
@@ -26,69 +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",
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int command;
|
int command;
|
||||||
@@ -109,7 +45,7 @@ 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 )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ GNU General Public License for more details.
|
|||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "gl_local.h"
|
|
||||||
#include "net_encode.h"
|
#include "net_encode.h"
|
||||||
|
|
||||||
#define dem_unknown 0 // unknown command
|
#define dem_unknown 0 // unknown command
|
||||||
@@ -52,6 +51,7 @@ const char *demo_cmd[dem_lastcmd+1] =
|
|||||||
"dem_stop",
|
"dem_stop",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#pragma pack( push, 1 )
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int id; // should be IDEM
|
int id; // should be IDEM
|
||||||
@@ -63,6 +63,7 @@ typedef struct
|
|||||||
char gamedir[64]; // name of game directory (FS_Gamedir())
|
char gamedir[64]; // name of game directory (FS_Gamedir())
|
||||||
int directory_offset; // offset of Entry Directory.
|
int directory_offset; // offset of Entry Directory.
|
||||||
} demoheader_t;
|
} demoheader_t;
|
||||||
|
#pragma pack( pop )
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@@ -106,6 +107,8 @@ struct
|
|||||||
int angle_position;
|
int angle_position;
|
||||||
} demo;
|
} demo;
|
||||||
|
|
||||||
|
static qboolean CL_NextDemo( void );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
====================
|
====================
|
||||||
CL_StartupDemoHeader
|
CL_StartupDemoHeader
|
||||||
@@ -155,7 +158,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];
|
||||||
}
|
}
|
||||||
@@ -167,7 +170,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;
|
||||||
}
|
}
|
||||||
@@ -193,7 +196,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;
|
||||||
|
|
||||||
@@ -266,7 +269,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 );
|
||||||
|
|
||||||
@@ -347,11 +350,11 @@ CL_WriteDemoHeader
|
|||||||
Write demo header
|
Write demo header
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
void CL_WriteDemoHeader( const char *name )
|
static void CL_WriteDemoHeader( const char *name )
|
||||||
{
|
{
|
||||||
long copysize;
|
int copysize;
|
||||||
long savepos;
|
int savepos;
|
||||||
long curpos;
|
int curpos;
|
||||||
|
|
||||||
Con_Printf( "recording to %s.\n", name );
|
Con_Printf( "recording to %s.\n", name );
|
||||||
cls.demofile = FS_Open( name, "wb", false );
|
cls.demofile = FS_Open( name, "wb", false );
|
||||||
@@ -370,8 +373,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 = PROTOCOL_VERSION;
|
demo.header.net_protocol = cls.legacymode ? PROTOCOL_LEGACY_VERSION : PROTOCOL_VERSION;
|
||||||
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 ));
|
||||||
@@ -435,7 +438,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;
|
||||||
@@ -489,7 +492,7 @@ void CL_DrawDemoRecording( void )
|
|||||||
{
|
{
|
||||||
char string[64];
|
char string[64];
|
||||||
rgba_t color = { 255, 255, 255, 255 };
|
rgba_t color = { 255, 255, 255, 255 };
|
||||||
long pos;
|
int pos;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
if(!( host_developer.value && cls.demorecording ))
|
if(!( host_developer.value && cls.demorecording ))
|
||||||
@@ -497,10 +500,10 @@ void CL_DrawDemoRecording( void )
|
|||||||
|
|
||||||
pos = FS_Tell( cls.demofile );
|
pos = FS_Tell( cls.demofile );
|
||||||
Q_snprintf( string, sizeof( string ), "^1RECORDING:^7 %s: %s time: %02d:%02d", cls.demoname,
|
Q_snprintf( string, sizeof( string ), "^1RECORDING:^7 %s: %s time: %02d:%02d", cls.demoname,
|
||||||
Q_memprint( pos ), (int)(cls.demotime / 60.0f ), (int)fmod( cls.demotime, 60.0f ));
|
Q_memprint( pos ), (int)(cls.demotime / 60.0f ), (int)fmod( cls.demotime, 60.0f ));
|
||||||
|
|
||||||
Con_DrawStringLen( string, &len, NULL );
|
Con_DrawStringLen( string, &len, NULL );
|
||||||
Con_DrawString(( glState.width - len ) >> 1, glState.height >> 2, string, color );
|
Con_DrawString(( refState.width - len ) >> 1, refState.height >> 4, string, color );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -517,14 +520,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -535,7 +550,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;
|
||||||
@@ -557,6 +572,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;
|
||||||
@@ -597,7 +615,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;
|
||||||
@@ -631,15 +649,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
|
||||||
{
|
{
|
||||||
@@ -674,7 +694,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 );
|
||||||
@@ -685,7 +705,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" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -703,7 +723,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" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -714,7 +734,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 )
|
||||||
{
|
{
|
||||||
@@ -736,7 +756,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;
|
||||||
|
|
||||||
@@ -787,7 +807,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;
|
||||||
@@ -887,7 +907,7 @@ qboolean CL_DemoReadMessage( byte *buffer, size_t *length )
|
|||||||
qboolean swallowmessages = true;
|
qboolean swallowmessages = true;
|
||||||
static int tdlastdemoframe = 0;
|
static int tdlastdemoframe = 0;
|
||||||
byte *userbuf = NULL;
|
byte *userbuf = NULL;
|
||||||
size_t size;
|
size_t size = 0;
|
||||||
byte cmd;
|
byte cmd;
|
||||||
|
|
||||||
if( !cls.demofile )
|
if( !cls.demofile )
|
||||||
@@ -912,7 +932,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;
|
||||||
@@ -1001,7 +1022,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;
|
||||||
@@ -1096,7 +1117,7 @@ CL_FinishTimeDemo
|
|||||||
show stats
|
show stats
|
||||||
==============
|
==============
|
||||||
*/
|
*/
|
||||||
void CL_FinishTimeDemo( void )
|
static void CL_FinishTimeDemo( void )
|
||||||
{
|
{
|
||||||
int frames;
|
int frames;
|
||||||
double time;
|
double time;
|
||||||
@@ -1108,7 +1129,10 @@ 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 );
|
Con_Printf( "timedemo result: %i frames %5.3f seconds %5.3f fps\n", frames, time, frames / time );
|
||||||
|
|
||||||
|
if( Sys_CheckParm( "-timedemo" ))
|
||||||
|
CL_Quit_f();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1153,6 +1177,7 @@ void CL_StopPlayback( void )
|
|||||||
// let game known about demo state
|
// let game known about demo state
|
||||||
Cvar_FullSet( "cl_background", "0", FCVAR_READ_ONLY );
|
Cvar_FullSet( "cl_background", "0", FCVAR_READ_ONLY );
|
||||||
cls.state = ca_disconnected;
|
cls.state = ca_disconnected;
|
||||||
|
memset( &cls.serveradr, 0, sizeof( cls.serveradr ) );
|
||||||
cls.set_lastdemo = false;
|
cls.set_lastdemo = false;
|
||||||
S_StopBackgroundTrack();
|
S_StopBackgroundTrack();
|
||||||
cls.connect_time = 0;
|
cls.connect_time = 0;
|
||||||
@@ -1169,7 +1194,7 @@ void CL_StopPlayback( void )
|
|||||||
CL_GetDemoComment
|
CL_GetDemoComment
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
qboolean CL_GetDemoComment( const char *demoname, char *comment )
|
int GAME_EXPORT CL_GetDemoComment( const char *demoname, char *comment )
|
||||||
{
|
{
|
||||||
file_t *demfile;
|
file_t *demfile;
|
||||||
demoheader_t demohdr;
|
demoheader_t demohdr;
|
||||||
@@ -1183,9 +1208,9 @@ qboolean CL_GetDemoComment( const char *demoname, char *comment )
|
|||||||
demfile = FS_Open( demoname, "rb", false );
|
demfile = FS_Open( demoname, "rb", false );
|
||||||
if( !demfile )
|
if( !demfile )
|
||||||
{
|
{
|
||||||
Q_strncpy( comment, "", MAX_STRING );
|
comment[0] = '\0';
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// read in the m_DemoHeader
|
// read in the m_DemoHeader
|
||||||
FS_Read( demfile, &demohdr, sizeof( demoheader_t ));
|
FS_Read( demfile, &demohdr, sizeof( demoheader_t ));
|
||||||
@@ -1197,7 +1222,9 @@ qboolean CL_GetDemoComment( const char *demoname, char *comment )
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( demohdr.net_protocol != PROTOCOL_VERSION || demohdr.dem_protocol != DEMO_PROTOCOL )
|
if(( demohdr.net_protocol != PROTOCOL_VERSION &&
|
||||||
|
demohdr.net_protocol != PROTOCOL_LEGACY_VERSION ) ||
|
||||||
|
demohdr.dem_protocol != DEMO_PROTOCOL )
|
||||||
{
|
{
|
||||||
FS_Close( demfile );
|
FS_Close( demfile );
|
||||||
Q_strncpy( comment, "<invalid protocol>", MAX_STRING );
|
Q_strncpy( comment, "<invalid protocol>", MAX_STRING );
|
||||||
@@ -1224,7 +1251,7 @@ qboolean CL_GetDemoComment( const char *demoname, char *comment )
|
|||||||
// split comment to sections
|
// split comment to sections
|
||||||
Q_strncpy( comment, demohdr.mapname, CS_SIZE );
|
Q_strncpy( comment, demohdr.mapname, CS_SIZE );
|
||||||
Q_strncpy( comment + CS_SIZE, demohdr.comment, CS_SIZE );
|
Q_strncpy( comment + CS_SIZE, demohdr.comment, CS_SIZE );
|
||||||
Q_strncpy( comment + CS_SIZE * 2, va( "%g sec", playtime ), CS_TIME );
|
Q_snprintf( comment + CS_SIZE * 2, CS_TIME, "%g sec", playtime );
|
||||||
|
|
||||||
// all done
|
// all done
|
||||||
FS_Close( demfile );
|
FS_Close( demfile );
|
||||||
@@ -1239,7 +1266,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];
|
||||||
|
|
||||||
@@ -1289,7 +1316,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 ();
|
||||||
@@ -1300,26 +1327,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 )
|
||||||
{
|
{
|
||||||
int a, b, c, d;
|
|
||||||
|
|
||||||
if( lastnum < 0 || lastnum > 9999 )
|
if( lastnum < 0 || lastnum > 9999 )
|
||||||
{
|
{
|
||||||
// bound
|
// bound
|
||||||
Q_strcpy( filename, "demo9999" );
|
Q_strncpy( filename, "demo9999", size );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
a = lastnum / 1000;
|
Q_snprintf( filename, size, "demo%04d", lastnum );
|
||||||
lastnum -= a * 1000;
|
|
||||||
b = lastnum / 100;
|
|
||||||
lastnum -= b * 100;
|
|
||||||
c = lastnum / 10;
|
|
||||||
lastnum -= c * 10;
|
|
||||||
d = lastnum;
|
|
||||||
|
|
||||||
Q_sprintf( filename, "demo%i%i%i%i", a, b, c, d );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1373,8 +1390,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1387,9 +1406,9 @@ 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 what old demo is removed
|
// make sure that old demo is removed
|
||||||
if( FS_FileExists( demopath, false ))
|
if( FS_FileExists( demopath, false ))
|
||||||
FS_Delete( demopath );
|
FS_Delete( demopath );
|
||||||
|
|
||||||
@@ -1414,7 +1433,7 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1461,7 +1480,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' )
|
||||||
{
|
{
|
||||||
@@ -1484,13 +1503,17 @@ void CL_PlayDemo_f( void )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( demo.header.net_protocol != PROTOCOL_VERSION || demo.header.dem_protocol != DEMO_PROTOCOL )
|
if( demo.header.dem_protocol != DEMO_PROTOCOL )
|
||||||
{
|
{
|
||||||
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 );
|
||||||
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 )
|
if( demo.header.net_protocol != PROTOCOL_VERSION &&
|
||||||
Con_Printf( S_ERROR "playdemo: net protocol outdated (%i should be %i)\n", 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();
|
CL_DemoAborted();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1523,6 +1546,7 @@ void CL_PlayDemo_f( void )
|
|||||||
|
|
||||||
// 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
|
||||||
}
|
}
|
||||||
@@ -1536,12 +1560,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
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ GNU General Public License for more details.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "client.h"
|
|
||||||
#include "gl_local.h"
|
|
||||||
#include "mod_local.h"
|
|
||||||
#include "entity_types.h"
|
#include "entity_types.h"
|
||||||
#include "studio.h"
|
#include "studio.h"
|
||||||
|
#include "world.h" // BOX_ON_PLANE_SIDE
|
||||||
|
#include "client.h"
|
||||||
|
#include "xash3d_mathlib.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===============================================================================
|
===============================================================================
|
||||||
@@ -33,46 +33,6 @@ 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;
|
||||||
|
|
||||||
/*
|
|
||||||
================
|
|
||||||
R_RemoveEfrags
|
|
||||||
|
|
||||||
Call when removing an object from the world or moving it to another position
|
|
||||||
================
|
|
||||||
*/
|
|
||||||
void R_RemoveEfrags( cl_entity_t *ent )
|
|
||||||
{
|
|
||||||
efrag_t *ef, *old, *walk, **prev;
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===================
|
===================
|
||||||
R_SplitEntityOnNode
|
R_SplitEntityOnNode
|
||||||
@@ -103,7 +63,7 @@ static void R_SplitEntityOnNode( mnode_t *node )
|
|||||||
return; // no free fragments...
|
return; // no free fragments...
|
||||||
}
|
}
|
||||||
|
|
||||||
clgame.free_efrags = clgame.free_efrags->entnext;
|
clgame.free_efrags = ef->entnext;
|
||||||
ef->entity = r_addent;
|
ef->entity = r_addent;
|
||||||
|
|
||||||
// add the entity link
|
// add the entity link
|
||||||
@@ -188,8 +148,6 @@ void R_StoreEfrags( efrag_t **ppefrag, int framecount )
|
|||||||
case mod_brush:
|
case mod_brush:
|
||||||
case mod_studio:
|
case mod_studio:
|
||||||
case mod_sprite:
|
case mod_sprite:
|
||||||
pent = pefrag->entity;
|
|
||||||
|
|
||||||
if( pent->visframe != framecount )
|
if( pent->visframe != framecount )
|
||||||
{
|
{
|
||||||
if( CL_AddVisibleEntity( pent, ET_FRAGMENTED ))
|
if( CL_AddVisibleEntity( pent, ET_FRAGMENTED ))
|
||||||
2171
engine/client/cl_efx.c
Normal file
2171
engine/client/cl_efx.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -40,7 +40,7 @@ CL_CalcPlayerVelocity
|
|||||||
compute velocity for a given client
|
compute velocity for a given client
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
void CL_CalcPlayerVelocity( int idx, vec3_t velocity )
|
static void CL_CalcPlayerVelocity( int idx, vec3_t velocity )
|
||||||
{
|
{
|
||||||
clientdata_t *pcd;
|
clientdata_t *pcd;
|
||||||
vec3_t delta;
|
vec3_t delta;
|
||||||
@@ -63,7 +63,7 @@ void CL_CalcPlayerVelocity( int idx, vec3_t velocity )
|
|||||||
if( dt != 0.0 )
|
if( dt != 0.0 )
|
||||||
{
|
{
|
||||||
VectorSubtract( clgame.entities[idx].curstate.velocity, clgame.entities[idx].prevstate.velocity, delta );
|
VectorSubtract( clgame.entities[idx].curstate.velocity, clgame.entities[idx].prevstate.velocity, delta );
|
||||||
VectorScale( delta, 1.0 / dt, velocity );
|
VectorScale( delta, 1.0f / dt, velocity );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -78,23 +78,48 @@ CL_DescribeEvent
|
|||||||
|
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
void CL_DescribeEvent( int slot, int flags, const char *eventname )
|
static void CL_DescribeEvent( event_info_t *ei, int slot )
|
||||||
{
|
{
|
||||||
int idx = (slot & 31);
|
int idx = (slot & 63) * 2;
|
||||||
con_nprint_t info;
|
con_nprint_t info;
|
||||||
|
string origin_str = { 0 }; //, angles_str = { 0 };
|
||||||
|
|
||||||
if( !eventname || !cl_showevents->value )
|
if( !cl_showevents.value )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// mark reliable as green and unreliable as red
|
info.time_to_live = 1.0f;
|
||||||
if( FBitSet( flags, FEV_RELIABLE ))
|
|
||||||
VectorSet( info.color, 0.0f, 1.0f, 0.0f );
|
|
||||||
else VectorSet( info.color, 1.0f, 0.0f, 0.0f );
|
|
||||||
|
|
||||||
info.time_to_live = 0.5f;
|
|
||||||
info.index = idx;
|
info.index = idx;
|
||||||
|
|
||||||
Con_NXPrintf( &info, "%i %f %s", slot, cl.time, eventname );
|
// mark reliable as green and unreliable as red
|
||||||
|
if( FBitSet( ei->flags, FEV_RELIABLE ))
|
||||||
|
VectorSet( info.color, 0.5f, 1.0f, 0.5f );
|
||||||
|
else VectorSet( info.color, 1.0f, 0.5f, 0.5f );
|
||||||
|
|
||||||
|
if( !VectorIsNull( ei->args.origin ))
|
||||||
|
{
|
||||||
|
Q_snprintf( origin_str, sizeof( origin_str ), "(%.2f,%.2f,%.2f)",
|
||||||
|
ei->args.origin[0], ei->args.origin[1], ei->args.origin[2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*if( !VectorIsNull( ei->args.angles ))
|
||||||
|
{
|
||||||
|
Q_snprintf( angles_str, sizeof( angles_str ), "ang %.2f %.2f %.2f",
|
||||||
|
ei->args.angles[0], ei->args.angles[1], ei->args.angles[2]);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
Con_NXPrintf( &info, "%i %.2f %c %s %s",
|
||||||
|
slot, cl.time,
|
||||||
|
(FBitSet( ei->flags, FEV_CLIENT ) ? 'c' :
|
||||||
|
FBitSet( ei->flags, FEV_SERVER ) ? 's' : '?'),
|
||||||
|
cl.event_precache[ei->index],
|
||||||
|
origin_str);
|
||||||
|
|
||||||
|
info.index++;
|
||||||
|
|
||||||
|
Con_NXPrintf( &info, "b(%i,%i) i(%i,%i) f(%.2f,%.2f)",
|
||||||
|
ei->args.bparam1, ei->args.bparam2,
|
||||||
|
ei->args.iparam1, ei->args.iparam2,
|
||||||
|
ei->args.fparam1, ei->args.fparam2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -133,7 +158,7 @@ CL_EventIndex
|
|||||||
*/
|
*/
|
||||||
word CL_EventIndex( const char *name )
|
word CL_EventIndex( const char *name )
|
||||||
{
|
{
|
||||||
int i;
|
word i;
|
||||||
|
|
||||||
if( !COM_CheckString( name ))
|
if( !COM_CheckString( name ))
|
||||||
return 0;
|
return 0;
|
||||||
@@ -177,7 +202,7 @@ CL_FireEvent
|
|||||||
|
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
qboolean CL_FireEvent( event_info_t *ei, int slot )
|
static qboolean CL_FireEvent( event_info_t *ei, int slot )
|
||||||
{
|
{
|
||||||
cl_user_event_t *ev;
|
cl_user_event_t *ev;
|
||||||
const char *name;
|
const char *name;
|
||||||
@@ -200,14 +225,25 @@ qboolean CL_FireEvent( event_info_t *ei, int slot )
|
|||||||
|
|
||||||
if( ev->index == ei->index )
|
if( ev->index == ei->index )
|
||||||
{
|
{
|
||||||
|
name = cl.event_precache[ei->index];
|
||||||
|
|
||||||
|
if( cl_trace_events.value )
|
||||||
|
{
|
||||||
|
Con_Printf( "^3EVENT %s AT %.2f %.2f %.2f\n" // event name
|
||||||
|
"\t%.2f %.2f %i %i %s %s\n", // bool params
|
||||||
|
name, ei->args.origin[0], ei->args.origin[1], ei->args.origin[2],
|
||||||
|
ei->args.fparam1, ei->args.fparam2,
|
||||||
|
ei->args.iparam1, ei->args.iparam2,
|
||||||
|
ei->args.bparam1 ? "TRUE" : "FALSE", ei->args.bparam2 ? "TRUE" : "FALSE" );
|
||||||
|
}
|
||||||
|
|
||||||
if( ev->func )
|
if( ev->func )
|
||||||
{
|
{
|
||||||
CL_DescribeEvent( slot, ei->flags, cl.event_precache[ei->index] );
|
CL_DescribeEvent( ei, slot );
|
||||||
ev->func( &ei->args );
|
ev->func( &ei->args );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
name = cl.event_precache[ei->index];
|
|
||||||
Con_Reportf( S_ERROR "CL_FireEvent: %s not hooked\n", name );
|
Con_Reportf( S_ERROR "CL_FireEvent: %s not hooked\n", name );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -256,7 +292,7 @@ CL_FindEvent
|
|||||||
find first empty event
|
find first empty event
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
event_info_t *CL_FindEmptyEvent( void )
|
static event_info_t *CL_FindEmptyEvent( void )
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
event_state_t *es;
|
event_state_t *es;
|
||||||
@@ -284,7 +320,7 @@ CL_FindEvent
|
|||||||
replace only unreliable events
|
replace only unreliable events
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
event_info_t *CL_FindUnreliableEvent( void )
|
static event_info_t *CL_FindUnreliableEvent( void )
|
||||||
{
|
{
|
||||||
event_state_t *es;
|
event_state_t *es;
|
||||||
event_info_t *ei;
|
event_info_t *ei;
|
||||||
@@ -314,7 +350,7 @@ CL_QueueEvent
|
|||||||
|
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
void CL_QueueEvent( int flags, int index, float delay, event_args_t *args )
|
static void CL_QueueEvent( int flags, int index, float delay, event_args_t *args )
|
||||||
{
|
{
|
||||||
event_info_t *ei;
|
event_info_t *ei;
|
||||||
|
|
||||||
@@ -393,7 +429,7 @@ void CL_ParseEvent( sizebuf_t *msg )
|
|||||||
event_index = MSG_ReadUBitLong( msg, MAX_EVENT_BITS );
|
event_index = MSG_ReadUBitLong( msg, MAX_EVENT_BITS );
|
||||||
|
|
||||||
if( MSG_ReadOneBit( msg ))
|
if( MSG_ReadOneBit( msg ))
|
||||||
packet_index = MSG_ReadUBitLong( msg, MAX_ENTITY_BITS );
|
packet_index = MSG_ReadUBitLong( msg, cls.legacymode ? MAX_LEGACY_ENTITY_BITS : MAX_ENTITY_BITS );
|
||||||
else packet_index = -1;
|
else packet_index = -1;
|
||||||
|
|
||||||
if( MSG_ReadOneBit( msg ))
|
if( MSG_ReadOneBit( msg ))
|
||||||
@@ -450,7 +486,7 @@ CL_PlaybackEvent
|
|||||||
|
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
void CL_PlaybackEvent( int flags, const edict_t *pInvoker, word eventindex, float delay, float *origin,
|
void GAME_EXPORT CL_PlaybackEvent( int flags, const edict_t *pInvoker, word eventindex, float delay, float *origin,
|
||||||
float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 )
|
float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 )
|
||||||
{
|
{
|
||||||
event_args_t args;
|
event_args_t args;
|
||||||
@@ -459,7 +495,7 @@ void CL_PlaybackEvent( int flags, const edict_t *pInvoker, word eventindex, floa
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// first check event for out of bounds
|
// first check event for out of bounds
|
||||||
if( eventindex < 1 || eventindex > MAX_EVENTS )
|
if( eventindex < 1 || eventindex >= MAX_EVENTS )
|
||||||
{
|
{
|
||||||
Con_DPrintf( S_ERROR "CL_PlaybackEvent: invalid eventindex %i\n", eventindex );
|
Con_DPrintf( S_ERROR "CL_PlaybackEvent: invalid eventindex %i\n", eventindex );
|
||||||
return;
|
return;
|
||||||
|
|||||||
377
engine/client/cl_font.c
Normal file
377
engine/client/cl_font.c
Normal file
@@ -0,0 +1,377 @@
|
|||||||
|
/*
|
||||||
|
cl_font.c - bare bones engine font manager
|
||||||
|
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 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
#include "filesystem.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "qfont.h"
|
||||||
|
|
||||||
|
qboolean CL_FixedFont( cl_font_t *font )
|
||||||
|
{
|
||||||
|
return font && font->valid && font->type == FONT_FIXED;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int CL_LoadFontTexture( const char *fontname, uint texFlags, int *width )
|
||||||
|
{
|
||||||
|
int font_width;
|
||||||
|
int tex;
|
||||||
|
|
||||||
|
if( !g_fsapi.FileExists( fontname, false ))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
tex = ref.dllFuncs.GL_LoadTexture( fontname, NULL, 0, texFlags );
|
||||||
|
if( !tex )
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
font_width = REF_GET_PARM( PARM_TEX_WIDTH, tex );
|
||||||
|
if( !font_width )
|
||||||
|
{
|
||||||
|
ref.dllFuncs.GL_FreeTexture( tex );
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
*width = font_width;
|
||||||
|
return tex;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int CL_FontRenderMode( convar_t *fontrender )
|
||||||
|
{
|
||||||
|
switch((int)fontrender->value )
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
return kRenderTransAdd;
|
||||||
|
case 1:
|
||||||
|
return kRenderTransAlpha;
|
||||||
|
case 2:
|
||||||
|
return kRenderTransTexture;
|
||||||
|
default:
|
||||||
|
Cvar_DirectSet( fontrender, fontrender->def_string );
|
||||||
|
}
|
||||||
|
|
||||||
|
return kRenderTransTexture;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CL_SetFontRendermode( cl_font_t *font )
|
||||||
|
{
|
||||||
|
ref.dllFuncs.GL_SetRenderMode( CL_FontRenderMode( font->rendermode ));
|
||||||
|
}
|
||||||
|
|
||||||
|
qboolean Con_LoadFixedWidthFont( const char *fontname, cl_font_t *font, float scale, convar_t *rendermode, uint texFlags )
|
||||||
|
{
|
||||||
|
int font_width, i;
|
||||||
|
|
||||||
|
if( !rendermode )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if( font->valid )
|
||||||
|
return true; // already loaded
|
||||||
|
|
||||||
|
font->hFontTexture = CL_LoadFontTexture( fontname, texFlags, &font_width );
|
||||||
|
if( !font->hFontTexture )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
font->type = FONT_FIXED;
|
||||||
|
font->valid = true;
|
||||||
|
font->scale = scale;
|
||||||
|
font->rendermode = rendermode;
|
||||||
|
font->charHeight = Q_rint( font_width / 16 * scale );
|
||||||
|
|
||||||
|
for( i = 0; i < ARRAYSIZE( font->fontRc ); i++ )
|
||||||
|
{
|
||||||
|
font->fontRc[i].left = ( i * font_width / 16 ) % font_width;
|
||||||
|
font->fontRc[i].right = font->fontRc[i].left + font_width / 16;
|
||||||
|
font->fontRc[i].top = ( i / 16 ) * ( font_width / 16 );
|
||||||
|
font->fontRc[i].bottom = font->fontRc[i].top + font_width / 16;
|
||||||
|
|
||||||
|
font->charWidths[i] = Q_rint( font_width / 16 * scale );
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qboolean Con_LoadVariableWidthFont( const char *fontname, cl_font_t *font, float scale, convar_t *rendermode, uint texFlags )
|
||||||
|
{
|
||||||
|
fs_offset_t length;
|
||||||
|
qfont_t src;
|
||||||
|
byte *pfile;
|
||||||
|
int font_width, i;
|
||||||
|
|
||||||
|
if( !rendermode )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if( font->valid )
|
||||||
|
return true;
|
||||||
|
|
||||||
|
pfile = g_fsapi.LoadFile( fontname, &length, false );
|
||||||
|
if( !pfile )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if( length < sizeof( src ))
|
||||||
|
{
|
||||||
|
Mem_Free( pfile );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy( &src, pfile, sizeof( src ));
|
||||||
|
Mem_Free( pfile );
|
||||||
|
|
||||||
|
font->hFontTexture = CL_LoadFontTexture( fontname, texFlags, &font_width );
|
||||||
|
if( !font->hFontTexture )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
font->type = FONT_VARIABLE;
|
||||||
|
font->valid = true;
|
||||||
|
font->scale = scale ? scale : 1.0f;
|
||||||
|
font->rendermode = rendermode;
|
||||||
|
font->charHeight = Q_rint( src.rowheight * scale );
|
||||||
|
|
||||||
|
for( i = 0; i < ARRAYSIZE( font->fontRc ); i++ )
|
||||||
|
{
|
||||||
|
const charinfo *ci = &src.fontinfo[i];
|
||||||
|
|
||||||
|
font->fontRc[i].left = (word)ci->startoffset % font_width;
|
||||||
|
font->fontRc[i].right = font->fontRc[i].left + ci->charwidth;
|
||||||
|
font->fontRc[i].top = (word)ci->startoffset / font_width;
|
||||||
|
font->fontRc[i].bottom = font->fontRc[i].top + src.rowheight;
|
||||||
|
|
||||||
|
font->charWidths[i] = Q_rint( src.fontinfo[i].charwidth * scale );
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CL_FreeFont( cl_font_t *font )
|
||||||
|
{
|
||||||
|
if( !font || !font->valid )
|
||||||
|
return;
|
||||||
|
|
||||||
|
ref.dllFuncs.GL_FreeTexture( font->hFontTexture );
|
||||||
|
memset( font, 0, sizeof( *font ));
|
||||||
|
}
|
||||||
|
|
||||||
|
static int CL_CalcTabStop( const cl_font_t *font, int x )
|
||||||
|
{
|
||||||
|
int space = font->charWidths[' '];
|
||||||
|
int tab = space * 6; // 6 spaces
|
||||||
|
int stop = tab - x % tab;
|
||||||
|
|
||||||
|
if( stop < space )
|
||||||
|
return tab * 2 - x % tab; // select next
|
||||||
|
|
||||||
|
return stop;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CL_DrawCharacter( float x, float y, int number, rgba_t color, cl_font_t *font, int flags )
|
||||||
|
{
|
||||||
|
wrect_t *rc;
|
||||||
|
float w, h;
|
||||||
|
float s1, t1, s2, t2, half = 0.5f;
|
||||||
|
int texw, texh;
|
||||||
|
|
||||||
|
if( !font || !font->valid || y < -font->charHeight )
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
// check if printable
|
||||||
|
if( number <= 32 )
|
||||||
|
{
|
||||||
|
if( number == ' ' )
|
||||||
|
return font->charWidths[' '];
|
||||||
|
else if( number == '\t' )
|
||||||
|
return CL_CalcTabStop( font, x );
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( FBitSet( flags, FONT_DRAW_UTF8 ))
|
||||||
|
number = Con_UtfProcessChar( number & 255 );
|
||||||
|
else number &= 255;
|
||||||
|
|
||||||
|
if( !number || !font->charWidths[number])
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
R_GetTextureParms( &texw, &texh, font->hFontTexture );
|
||||||
|
if( !texw || !texh )
|
||||||
|
return font->charWidths[number];
|
||||||
|
|
||||||
|
rc = &font->fontRc[number];
|
||||||
|
|
||||||
|
if( font->scale <= 1.f || !REF_GET_PARM( PARM_TEX_FILTERING, font->hFontTexture ))
|
||||||
|
half = 0;
|
||||||
|
|
||||||
|
s1 = ((float)rc->left + half ) / texw;
|
||||||
|
t1 = ((float)rc->top + half ) / texh;
|
||||||
|
s2 = ((float)rc->right - half ) / texw;
|
||||||
|
t2 = ((float)rc->bottom - half ) / texh;
|
||||||
|
w = ( rc->right - rc->left ) * font->scale;
|
||||||
|
h = ( rc->bottom - rc->top ) * font->scale;
|
||||||
|
|
||||||
|
if( FBitSet( flags, FONT_DRAW_HUD ))
|
||||||
|
SPR_AdjustSize( &x, &y, &w, &h );
|
||||||
|
|
||||||
|
if( !FBitSet( flags, FONT_DRAW_NORENDERMODE ))
|
||||||
|
CL_SetFontRendermode( font );
|
||||||
|
|
||||||
|
// don't apply color to fixed fonts it's already colored
|
||||||
|
if( font->type != FONT_FIXED || REF_GET_PARM( PARM_TEX_GLFORMAT, font->hFontTexture ) == 0x8045 ) // GL_LUMINANCE8_ALPHA8
|
||||||
|
ref.dllFuncs.Color4ub( color[0], color[1], color[2], color[3] );
|
||||||
|
else ref.dllFuncs.Color4ub( 255, 255, 255, color[3] );
|
||||||
|
ref.dllFuncs.R_DrawStretchPic( x, y, w, h, s1, t1, s2, t2, font->hFontTexture );
|
||||||
|
|
||||||
|
return font->charWidths[number];
|
||||||
|
}
|
||||||
|
|
||||||
|
int CL_DrawString( float x, float y, const char *s, rgba_t color, cl_font_t *font, int flags )
|
||||||
|
{
|
||||||
|
rgba_t current_color;
|
||||||
|
int draw_len = 0;
|
||||||
|
|
||||||
|
if( !font || !font->valid )
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if( FBitSet( flags, FONT_DRAW_UTF8 ))
|
||||||
|
Con_UtfProcessChar( 0 ); // clear utf state
|
||||||
|
|
||||||
|
if( !FBitSet( flags, FONT_DRAW_NORENDERMODE ))
|
||||||
|
CL_SetFontRendermode( font );
|
||||||
|
|
||||||
|
Vector4Copy( color, current_color );
|
||||||
|
|
||||||
|
while( *s )
|
||||||
|
{
|
||||||
|
if( *s == '\n' )
|
||||||
|
{
|
||||||
|
s++;
|
||||||
|
|
||||||
|
if( !*s )
|
||||||
|
break;
|
||||||
|
|
||||||
|
// some client functions ignore newlines
|
||||||
|
if( !FBitSet( flags, FONT_DRAW_NOLF ))
|
||||||
|
{
|
||||||
|
draw_len = 0;
|
||||||
|
y += font->charHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( FBitSet( flags, FONT_DRAW_RESETCOLORONLF ))
|
||||||
|
Vector4Copy( color, current_color );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( IsColorString( s ))
|
||||||
|
{
|
||||||
|
// don't copy alpha
|
||||||
|
if( !FBitSet( flags, FONT_DRAW_FORCECOL ))
|
||||||
|
VectorCopy( g_color_table[ColorIndex(*( s + 1 ))], current_color );
|
||||||
|
|
||||||
|
s += 2;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// skip setting rendermode, it was changed for this string already
|
||||||
|
draw_len += CL_DrawCharacter( x + draw_len, y, (byte)*s, current_color, font, flags | FONT_DRAW_NORENDERMODE );
|
||||||
|
|
||||||
|
s++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return draw_len;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CL_DrawStringf( cl_font_t *font, float x, float y, rgba_t color, int flags, const char *fmt, ... )
|
||||||
|
{
|
||||||
|
va_list va;
|
||||||
|
char buf[MAX_VA_STRING];
|
||||||
|
|
||||||
|
va_start( va, fmt );
|
||||||
|
Q_vsnprintf( buf, sizeof( buf ), fmt, va );
|
||||||
|
va_end( va );
|
||||||
|
|
||||||
|
return CL_DrawString( x, y, buf, color, font, flags );
|
||||||
|
}
|
||||||
|
|
||||||
|
void CL_DrawCharacterLen( cl_font_t *font, int number, int *width, int *height )
|
||||||
|
{
|
||||||
|
if( !font || !font->valid ) return;
|
||||||
|
if( width )
|
||||||
|
{
|
||||||
|
if( number == '\t' )
|
||||||
|
*width = CL_CalcTabStop( font, 0 ); // at least return max tabstop
|
||||||
|
else *width = font->charWidths[number & 255];
|
||||||
|
}
|
||||||
|
if( height ) *height = font->charHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CL_DrawStringLen( cl_font_t *font, const char *s, int *width, int *height, int flags )
|
||||||
|
{
|
||||||
|
int draw_len = 0;
|
||||||
|
|
||||||
|
if( !font || !font->valid )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if( height )
|
||||||
|
*height = font->charHeight;
|
||||||
|
|
||||||
|
if( width )
|
||||||
|
*width = 0;
|
||||||
|
|
||||||
|
if( !COM_CheckString( s ))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if( FBitSet( flags, FONT_DRAW_UTF8 ))
|
||||||
|
Con_UtfProcessChar( 0 ); // reset utf state
|
||||||
|
|
||||||
|
while( *s )
|
||||||
|
{
|
||||||
|
int number;
|
||||||
|
|
||||||
|
if( *s == '\n' )
|
||||||
|
{
|
||||||
|
// BUG: no check for end string here
|
||||||
|
// but high chances somebody's relying on this
|
||||||
|
s++;
|
||||||
|
draw_len = 0;
|
||||||
|
if( !FBitSet( flags, FONT_DRAW_NOLF ))
|
||||||
|
{
|
||||||
|
if( height )
|
||||||
|
*height += font->charHeight;
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else if( *s == '\t' )
|
||||||
|
{
|
||||||
|
draw_len += CL_CalcTabStop( font, 0 ); // at least return max tabstop
|
||||||
|
s++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( IsColorString( s ))
|
||||||
|
{
|
||||||
|
s += 2;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( FBitSet( flags, FONT_DRAW_UTF8 ))
|
||||||
|
number = Con_UtfProcessChar( (byte)*s );
|
||||||
|
else number = (byte)*s;
|
||||||
|
|
||||||
|
if( number )
|
||||||
|
{
|
||||||
|
draw_len += font->charWidths[number];
|
||||||
|
|
||||||
|
if( draw_len > *width )
|
||||||
|
*width = draw_len;
|
||||||
|
}
|
||||||
|
|
||||||
|
s++;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,7 +17,6 @@ GNU General Public License for more details.
|
|||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "net_encode.h"
|
#include "net_encode.h"
|
||||||
#include "entity_types.h"
|
#include "entity_types.h"
|
||||||
#include "gl_local.h"
|
|
||||||
#include "pm_local.h"
|
#include "pm_local.h"
|
||||||
#include "cl_tent.h"
|
#include "cl_tent.h"
|
||||||
#include "studio.h"
|
#include "studio.h"
|
||||||
@@ -25,7 +24,7 @@ GNU General Public License for more details.
|
|||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
|
||||||
#define STUDIO_INTERPOLATION_FIX
|
// #define STUDIO_INTERPOLATION_FIX
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==================
|
==================
|
||||||
@@ -53,16 +52,30 @@ CL_UpdatePositions
|
|||||||
Store another position into interpolation circular buffer
|
Store another position into interpolation circular buffer
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
void CL_UpdatePositions( cl_entity_t *ent )
|
static void CL_UpdatePositions( cl_entity_t *ent )
|
||||||
{
|
{
|
||||||
position_history_t *ph;
|
position_history_t *ph, *prev;
|
||||||
|
|
||||||
|
prev = &ent->ph[ent->current_position];
|
||||||
|
|
||||||
ent->current_position = (ent->current_position + 1) & HISTORY_MASK;
|
ent->current_position = (ent->current_position + 1) & HISTORY_MASK;
|
||||||
ph = &ent->ph[ent->current_position];
|
ph = &ent->ph[ent->current_position];
|
||||||
|
|
||||||
VectorCopy( ent->curstate.origin, ph->origin );
|
VectorCopy( ent->curstate.origin, ph->origin );
|
||||||
VectorCopy( ent->curstate.angles, ph->angles );
|
VectorCopy( ent->curstate.angles, ph->angles );
|
||||||
ph->animtime = ent->curstate.animtime; // !!!
|
|
||||||
|
ph->animtime = ent->curstate.animtime;
|
||||||
|
|
||||||
|
// a1ba: for some reason, this sometimes still may happen
|
||||||
|
// at this time, I'm not sure whether this bug happens in delta readwrite code
|
||||||
|
// or server just decides to go backwards and really sends these values
|
||||||
|
if( ph->animtime < prev->animtime )
|
||||||
|
{
|
||||||
|
// try to deduce real animtime by looking up the difference between
|
||||||
|
// server messages (cl.mtime is never modified ny the interpolation code)
|
||||||
|
float diff = Q_max( 0, ent->curstate.msg_time - ent->prevstate.msg_time );
|
||||||
|
|
||||||
|
ph->animtime = prev->animtime + diff;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -72,7 +85,7 @@ CL_ResetPositions
|
|||||||
Interpolation init or reset after teleporting
|
Interpolation init or reset after teleporting
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
void CL_ResetPositions( cl_entity_t *ent )
|
static void CL_ResetPositions( cl_entity_t *ent )
|
||||||
{
|
{
|
||||||
position_history_t store;
|
position_history_t store;
|
||||||
|
|
||||||
@@ -94,7 +107,7 @@ check for instant movement in case
|
|||||||
we don't want interpolate this
|
we don't want interpolate this
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
qboolean CL_EntityTeleported( cl_entity_t *ent )
|
static qboolean CL_EntityTeleported( cl_entity_t *ent )
|
||||||
{
|
{
|
||||||
float len, maxlen;
|
float len, maxlen;
|
||||||
vec3_t delta;
|
vec3_t delta;
|
||||||
@@ -102,7 +115,7 @@ qboolean CL_EntityTeleported( cl_entity_t *ent )
|
|||||||
VectorSubtract( ent->curstate.origin, ent->prevstate.origin, delta );
|
VectorSubtract( ent->curstate.origin, ent->prevstate.origin, delta );
|
||||||
|
|
||||||
// compute potential max movement in units per frame and compare with entity movement
|
// compute potential max movement in units per frame and compare with entity movement
|
||||||
maxlen = ( clgame.movevars.maxvelocity * ( 1.0 / GAME_FPS ));
|
maxlen = ( clgame.movevars.maxvelocity * ( 1.0f / GAME_FPS ));
|
||||||
len = VectorLength( delta );
|
len = VectorLength( delta );
|
||||||
|
|
||||||
return (len > maxlen);
|
return (len > maxlen);
|
||||||
@@ -115,7 +128,7 @@ CL_CompareTimestamps
|
|||||||
round-off floating errors
|
round-off floating errors
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
qboolean CL_CompareTimestamps( float t1, float t2 )
|
static qboolean CL_CompareTimestamps( float t1, float t2 )
|
||||||
{
|
{
|
||||||
int iTime1 = t1 * 1000;
|
int iTime1 = t1 * 1000;
|
||||||
int iTime2 = t2 * 1000;
|
int iTime2 = t2 * 1000;
|
||||||
@@ -130,8 +143,11 @@ CL_EntityIgnoreLerp
|
|||||||
some ents will be ignore lerping
|
some ents will be ignore lerping
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
qboolean CL_EntityIgnoreLerp( cl_entity_t *e )
|
static qboolean CL_EntityIgnoreLerp( cl_entity_t *e )
|
||||||
{
|
{
|
||||||
|
if( cl_nointerp.value > 0.f )
|
||||||
|
return true;
|
||||||
|
|
||||||
if( e->model && e->model->type == mod_alias )
|
if( e->model && e->model->type == mod_alias )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -144,7 +160,7 @@ CL_EntityCustomLerp
|
|||||||
|
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
qboolean CL_EntityCustomLerp( cl_entity_t *e )
|
static qboolean CL_EntityCustomLerp( cl_entity_t *e )
|
||||||
{
|
{
|
||||||
switch( e->curstate.movetype )
|
switch( e->curstate.movetype )
|
||||||
{
|
{
|
||||||
@@ -154,6 +170,13 @@ qboolean CL_EntityCustomLerp( cl_entity_t *e )
|
|||||||
case MOVETYPE_FLY:
|
case MOVETYPE_FLY:
|
||||||
case MOVETYPE_COMPOUND:
|
case MOVETYPE_COMPOUND:
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// ABSOLUTELY STUPID HACK TO ALLOW MONSTERS
|
||||||
|
// INTERPOLATION IN GRAVGUNMOD COOP
|
||||||
|
// MUST BE REMOVED ONCE WE REMOVE 48 PROTO SUPPORT
|
||||||
|
case MOVETYPE_TOSS:
|
||||||
|
if( cls.legacymode && e->model && e->model->type == mod_studio )
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -166,7 +189,7 @@ CL_ParametricMove
|
|||||||
check for parametrical moved entities
|
check for parametrical moved entities
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
qboolean CL_ParametricMove( cl_entity_t *ent )
|
static qboolean CL_ParametricMove( cl_entity_t *ent )
|
||||||
{
|
{
|
||||||
float frac, dt, t;
|
float frac, dt, t;
|
||||||
vec3_t delta;
|
vec3_t delta;
|
||||||
@@ -203,7 +226,7 @@ CL_UpdateLatchedVars
|
|||||||
|
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
void CL_UpdateLatchedVars( cl_entity_t *ent )
|
static void CL_UpdateLatchedVars( cl_entity_t *ent )
|
||||||
{
|
{
|
||||||
if( !ent->model || ( ent->model->type != mod_alias && ent->model->type != mod_studio ))
|
if( !ent->model || ( ent->model->type != mod_alias && ent->model->type != mod_studio ))
|
||||||
return; // below fields used only for alias and studio interpolation
|
return; // below fields used only for alias and studio interpolation
|
||||||
@@ -217,7 +240,7 @@ void CL_UpdateLatchedVars( cl_entity_t *ent )
|
|||||||
|
|
||||||
if( ent->curstate.sequence != ent->prevstate.sequence )
|
if( ent->curstate.sequence != ent->prevstate.sequence )
|
||||||
{
|
{
|
||||||
memcpy( ent->prevstate.blending, ent->latched.prevseqblending, sizeof( ent->prevstate.blending ));
|
memcpy( ent->latched.prevseqblending, ent->prevstate.blending, sizeof( ent->latched.prevseqblending ));
|
||||||
ent->latched.prevsequence = ent->prevstate.sequence;
|
ent->latched.prevsequence = ent->prevstate.sequence;
|
||||||
ent->latched.sequencetime = ent->curstate.animtime;
|
ent->latched.sequencetime = ent->curstate.animtime;
|
||||||
}
|
}
|
||||||
@@ -230,6 +253,33 @@ void CL_UpdateLatchedVars( cl_entity_t *ent )
|
|||||||
clgame.drawFuncs.CL_UpdateLatchedVars( ent, false );
|
clgame.drawFuncs.CL_UpdateLatchedVars( ent, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
====================
|
||||||
|
CL_GetStudioEstimatedFrame
|
||||||
|
|
||||||
|
====================
|
||||||
|
*/
|
||||||
|
static float CL_GetStudioEstimatedFrame( cl_entity_t *ent )
|
||||||
|
{
|
||||||
|
studiohdr_t *pstudiohdr;
|
||||||
|
mstudioseqdesc_t *pseqdesc;
|
||||||
|
int sequence;
|
||||||
|
|
||||||
|
if( ent->model != NULL && ent->model->type == mod_studio )
|
||||||
|
{
|
||||||
|
pstudiohdr = (studiohdr_t *)Mod_StudioExtradata( ent->model );
|
||||||
|
|
||||||
|
if( pstudiohdr )
|
||||||
|
{
|
||||||
|
sequence = bound( 0, ent->curstate.sequence, pstudiohdr->numseq - 1 );
|
||||||
|
pseqdesc = (mstudioseqdesc_t *)((byte *)pstudiohdr + pstudiohdr->seqindex) + sequence;
|
||||||
|
return ref.dllFuncs.R_StudioEstimateFrame( ent, pseqdesc, cl.time );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
====================
|
====================
|
||||||
CL_ResetLatchedVars
|
CL_ResetLatchedVars
|
||||||
@@ -271,7 +321,7 @@ CL_ProcessEntityUpdate
|
|||||||
apply changes since new frame received
|
apply changes since new frame received
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
void CL_ProcessEntityUpdate( cl_entity_t *ent )
|
static void CL_ProcessEntityUpdate( cl_entity_t *ent )
|
||||||
{
|
{
|
||||||
qboolean parametric;
|
qboolean parametric;
|
||||||
|
|
||||||
@@ -281,7 +331,7 @@ void CL_ProcessEntityUpdate( cl_entity_t *ent )
|
|||||||
if( FBitSet( ent->curstate.entityType, ENTITY_NORMAL ))
|
if( FBitSet( ent->curstate.entityType, ENTITY_NORMAL ))
|
||||||
COM_NormalizeAngles( ent->curstate.angles );
|
COM_NormalizeAngles( ent->curstate.angles );
|
||||||
|
|
||||||
parametric = CL_ParametricMove( ent );
|
parametric = ent->curstate.starttime != 0.0f && ent->curstate.impacttime != 0.0f;
|
||||||
|
|
||||||
// allow interpolation on bmodels too
|
// allow interpolation on bmodels too
|
||||||
if( ent->model && ent->model->type == mod_brush )
|
if( ent->model && ent->model->type == mod_brush )
|
||||||
@@ -317,11 +367,10 @@ CL_FindInterpolationUpdates
|
|||||||
find two timestamps
|
find two timestamps
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
qboolean CL_FindInterpolationUpdates( cl_entity_t *ent, float targettime, position_history_t **ph0, position_history_t **ph1 )
|
static qboolean CL_FindInterpolationUpdates( cl_entity_t *ent, double targettime, position_history_t **ph0, position_history_t **ph1 )
|
||||||
{
|
{
|
||||||
qboolean extrapolate = true;
|
qboolean extrapolate = true;
|
||||||
int i, i0, i1, imod;
|
uint i, i0, i1, imod;
|
||||||
float at;
|
|
||||||
|
|
||||||
imod = ent->current_position;
|
imod = ent->current_position;
|
||||||
i0 = (imod - 0) & HISTORY_MASK; // curpos (lerp end)
|
i0 = (imod - 0) & HISTORY_MASK; // curpos (lerp end)
|
||||||
@@ -329,8 +378,10 @@ qboolean CL_FindInterpolationUpdates( cl_entity_t *ent, float targettime, positi
|
|||||||
|
|
||||||
for( i = 1; i < HISTORY_MAX - 1; i++ )
|
for( i = 1; i < HISTORY_MAX - 1; i++ )
|
||||||
{
|
{
|
||||||
at = ent->ph[( imod - i ) & HISTORY_MASK].animtime;
|
double at = ent->ph[( imod - i ) & HISTORY_MASK].animtime;
|
||||||
if( at == 0.0 ) break;
|
|
||||||
|
if( at == 0.0f )
|
||||||
|
break;
|
||||||
|
|
||||||
if( targettime > at )
|
if( targettime > at )
|
||||||
{
|
{
|
||||||
@@ -355,15 +406,14 @@ CL_PureOrigin
|
|||||||
non-local players interpolation
|
non-local players interpolation
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
void CL_PureOrigin( cl_entity_t *ent, float t, vec3_t outorigin, vec3_t outangles )
|
static void CL_PureOrigin( cl_entity_t *ent, double t, vec3_t outorigin, vec3_t outangles )
|
||||||
{
|
{
|
||||||
qboolean extrapolate;
|
double t1, t0, frac;
|
||||||
float t1, t0, frac;
|
|
||||||
position_history_t *ph0, *ph1;
|
position_history_t *ph0, *ph1;
|
||||||
vec3_t delta;
|
vec3_t delta;
|
||||||
|
|
||||||
// NOTE: ph0 is next, ph1 is a prev
|
// NOTE: ph0 is next, ph1 is a prev
|
||||||
extrapolate = CL_FindInterpolationUpdates( ent, t, &ph0, &ph1 );
|
CL_FindInterpolationUpdates( ent, t, &ph0, &ph1 );
|
||||||
|
|
||||||
if ( !ph0 || !ph1 )
|
if ( !ph0 || !ph1 )
|
||||||
return;
|
return;
|
||||||
@@ -371,17 +421,17 @@ void CL_PureOrigin( cl_entity_t *ent, float t, vec3_t outorigin, vec3_t outangle
|
|||||||
t0 = ph0->animtime;
|
t0 = ph0->animtime;
|
||||||
t1 = ph1->animtime;
|
t1 = ph1->animtime;
|
||||||
|
|
||||||
if( t0 != 0.0f )
|
if( t0 != 0.0 )
|
||||||
{
|
{
|
||||||
vec4_t q, q1, q2;
|
vec4_t q, q1, q2;
|
||||||
|
|
||||||
VectorSubtract( ph0->origin, ph1->origin, delta );
|
VectorSubtract( ph0->origin, ph1->origin, delta );
|
||||||
|
|
||||||
if( t0 != t1 )
|
if( !Q_equal( t0, t1 ))
|
||||||
frac = ( t - t1 ) / ( t0 - t1 );
|
frac = ( t - t1 ) / ( t0 - t1 );
|
||||||
else frac = 1.0f;
|
else frac = 1.0;
|
||||||
|
|
||||||
frac = bound( 0.0f, frac, 1.2f );
|
frac = bound( 0.0, frac, 1.2 );
|
||||||
|
|
||||||
VectorMA( ph1->origin, frac, delta, outorigin );
|
VectorMA( ph1->origin, frac, delta, outorigin );
|
||||||
|
|
||||||
@@ -405,11 +455,11 @@ CL_InterpolateModel
|
|||||||
non-players interpolation
|
non-players interpolation
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
int CL_InterpolateModel( cl_entity_t *e )
|
static int CL_InterpolateModel( cl_entity_t *e )
|
||||||
{
|
{
|
||||||
position_history_t *ph0 = NULL, *ph1 = NULL;
|
position_history_t *ph0 = NULL, *ph1 = NULL;
|
||||||
vec3_t origin, angles, delta;
|
vec3_t origin, angles, delta;
|
||||||
float t, t1, t2, frac;
|
double t, t1, t2, frac;
|
||||||
vec4_t q, q1, q2;
|
vec4_t q, q1, q2;
|
||||||
|
|
||||||
VectorCopy( e->curstate.origin, e->origin );
|
VectorCopy( e->curstate.origin, e->origin );
|
||||||
@@ -432,13 +482,13 @@ int CL_InterpolateModel( cl_entity_t *e )
|
|||||||
if( cl.maxclients <= 1 )
|
if( cl.maxclients <= 1 )
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if( e->model->type == mod_brush && !cl_bmodelinterp->value )
|
if( e->model->type == mod_brush && !cl_bmodelinterp.value )
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if( cl.local.moving && cl.local.onground == e->index )
|
if( cl.local.moving && cl.local.onground == e->index )
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
t = cl.time - cl_interp->value;
|
t = cl.time - cl_interp.value;
|
||||||
CL_FindInterpolationUpdates( e, t, &ph0, &ph1 );
|
CL_FindInterpolationUpdates( e, t, &ph0, &ph1 );
|
||||||
|
|
||||||
if( ph0 == NULL || ph1 == NULL )
|
if( ph0 == NULL || ph1 == NULL )
|
||||||
@@ -457,7 +507,7 @@ int CL_InterpolateModel( cl_entity_t *e )
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( t2 == t1 )
|
if( Q_equal( t2, t1 ))
|
||||||
{
|
{
|
||||||
VectorCopy( ph0->origin, e->origin );
|
VectorCopy( ph0->origin, e->origin );
|
||||||
VectorCopy( ph0->angles, e->angles );
|
VectorCopy( ph0->angles, e->angles );
|
||||||
@@ -495,14 +545,21 @@ interpolate non-local clients
|
|||||||
*/
|
*/
|
||||||
void CL_ComputePlayerOrigin( cl_entity_t *ent )
|
void CL_ComputePlayerOrigin( cl_entity_t *ent )
|
||||||
{
|
{
|
||||||
float targettime;
|
double targettime;
|
||||||
vec4_t q, q1, q2;
|
vec4_t q, q1, q2;
|
||||||
vec3_t origin;
|
vec3_t origin;
|
||||||
vec3_t angles;
|
vec3_t angles;
|
||||||
|
|
||||||
if( !ent->player || ent->index == ( cl.playernum + 1 ))
|
if( !ent->player )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if( cl_nointerp.value > 0.f )
|
||||||
|
{
|
||||||
|
VectorCopy( ent->curstate.angles, ent->angles );
|
||||||
|
VectorCopy( ent->curstate.origin, ent->origin );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if( cls.demoplayback == DEMO_QUAKE1 )
|
if( cls.demoplayback == DEMO_QUAKE1 )
|
||||||
{
|
{
|
||||||
// quake lerping is easy
|
// quake lerping is easy
|
||||||
@@ -514,7 +571,7 @@ void CL_ComputePlayerOrigin( cl_entity_t *ent )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
targettime = cl.time - cl_interp->value;
|
targettime = cl.time - cl_interp.value;
|
||||||
CL_PureOrigin( ent, targettime, origin, angles );
|
CL_PureOrigin( ent, targettime, origin, angles );
|
||||||
|
|
||||||
VectorCopy( angles, ent->angles );
|
VectorCopy( angles, ent->angles );
|
||||||
@@ -528,7 +585,7 @@ CL_ProcessPlayerState
|
|||||||
process player states after the new packet has received
|
process player states after the new packet has received
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void CL_ProcessPlayerState( int playerindex, entity_state_t *state )
|
static void CL_ProcessPlayerState( int playerindex, entity_state_t *state )
|
||||||
{
|
{
|
||||||
entity_state_t *ps;
|
entity_state_t *ps;
|
||||||
|
|
||||||
@@ -548,7 +605,7 @@ reset latched state if this frame entity was teleported
|
|||||||
or just EF_NOINTERP was set
|
or just EF_NOINTERP was set
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void CL_ResetLatchedState( int pnum, frame_t *frame, cl_entity_t *ent )
|
static void CL_ResetLatchedState( int pnum, frame_t *frame, cl_entity_t *ent )
|
||||||
{
|
{
|
||||||
if( CHECKVISBIT( frame->flags, pnum ))
|
if( CHECKVISBIT( frame->flags, pnum ))
|
||||||
{
|
{
|
||||||
@@ -613,6 +670,24 @@ FRAME PARSING
|
|||||||
|
|
||||||
=========================================================================
|
=========================================================================
|
||||||
*/
|
*/
|
||||||
|
static qboolean CL_ParseEntityNumFromPacket( sizebuf_t *msg, int *newnum )
|
||||||
|
{
|
||||||
|
if( cls.legacymode )
|
||||||
|
{
|
||||||
|
*newnum = MSG_ReadWord( msg );
|
||||||
|
if( *newnum == 0 )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*newnum = MSG_ReadUBitLong( msg, MAX_ENTITY_BITS );
|
||||||
|
if( *newnum == LAST_EDICT )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=================
|
=================
|
||||||
CL_FlushEntityPacket
|
CL_FlushEntityPacket
|
||||||
@@ -620,7 +695,7 @@ CL_FlushEntityPacket
|
|||||||
Read and ignore whole entity packet.
|
Read and ignore whole entity packet.
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void CL_FlushEntityPacket( sizebuf_t *msg )
|
static void CL_FlushEntityPacket( sizebuf_t *msg )
|
||||||
{
|
{
|
||||||
int newnum;
|
int newnum;
|
||||||
entity_state_t from, to;
|
entity_state_t from, to;
|
||||||
@@ -633,8 +708,8 @@ void CL_FlushEntityPacket( sizebuf_t *msg )
|
|||||||
// read it all, but ignore it
|
// read it all, but ignore it
|
||||||
while( 1 )
|
while( 1 )
|
||||||
{
|
{
|
||||||
newnum = MSG_ReadUBitLong( msg, MAX_ENTITY_BITS );
|
if( !CL_ParseEntityNumFromPacket( msg, &newnum ))
|
||||||
if( newnum == LAST_EDICT ) break; // done
|
break; // done
|
||||||
|
|
||||||
if( MSG_CheckOverflow( msg ))
|
if( MSG_CheckOverflow( msg ))
|
||||||
Host_Error( "CL_FlushEntityPacket: overflow\n" );
|
Host_Error( "CL_FlushEntityPacket: overflow\n" );
|
||||||
@@ -650,7 +725,7 @@ CL_DeltaEntity
|
|||||||
processing delta update
|
processing delta update
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void CL_DeltaEntity( sizebuf_t *msg, frame_t *frame, int newnum, entity_state_t *old, qboolean has_update )
|
static void CL_DeltaEntity( sizebuf_t *msg, frame_t *frame, int newnum, entity_state_t *old, qboolean has_update )
|
||||||
{
|
{
|
||||||
cl_entity_t *ent;
|
cl_entity_t *ent;
|
||||||
entity_state_t *state;
|
entity_state_t *state;
|
||||||
@@ -729,7 +804,10 @@ int CL_ParsePacketEntities( sizebuf_t *msg, qboolean delta )
|
|||||||
CL_WriteDemoJumpTime();
|
CL_WriteDemoJumpTime();
|
||||||
|
|
||||||
// sentinel count. save it for debug checking
|
// sentinel count. save it for debug checking
|
||||||
count = ( MSG_ReadUBitLong( msg, MAX_VISIBLE_PACKET_BITS ) + 1 );
|
if( cls.legacymode )
|
||||||
|
count = MSG_ReadWord( msg );
|
||||||
|
else count = MSG_ReadUBitLong( msg, MAX_VISIBLE_PACKET_BITS ) + 1;
|
||||||
|
|
||||||
newframe = &cl.frames[cl.parsecountmod];
|
newframe = &cl.frames[cl.parsecountmod];
|
||||||
|
|
||||||
// allocate parse entities
|
// allocate parse entities
|
||||||
@@ -803,11 +881,12 @@ int CL_ParsePacketEntities( sizebuf_t *msg, qboolean delta )
|
|||||||
|
|
||||||
while( 1 )
|
while( 1 )
|
||||||
{
|
{
|
||||||
newnum = MSG_ReadUBitLong( msg, MAX_ENTITY_BITS );
|
if( !CL_ParseEntityNumFromPacket( msg, &newnum ))
|
||||||
if( newnum == LAST_EDICT ) break; // end of packet entities
|
break; // done
|
||||||
|
|
||||||
if( MSG_CheckOverflow( msg ))
|
if( MSG_CheckOverflow( msg ))
|
||||||
Host_Error( "CL_ParsePacketEntities: overflow\n" );
|
Host_Error( "CL_ParsePacketEntities: overflow\n" );
|
||||||
|
|
||||||
player = CL_IsPlayerIndex( newnum );
|
player = CL_IsPlayerIndex( newnum );
|
||||||
|
|
||||||
while( oldnum < newnum )
|
while( oldnum < newnum )
|
||||||
@@ -916,9 +995,25 @@ all the visible entities should pass this filter
|
|||||||
*/
|
*/
|
||||||
qboolean CL_AddVisibleEntity( cl_entity_t *ent, int entityType )
|
qboolean CL_AddVisibleEntity( cl_entity_t *ent, int entityType )
|
||||||
{
|
{
|
||||||
|
qboolean draw_player = true;
|
||||||
|
|
||||||
if( !ent || !ent->model )
|
if( !ent || !ent->model )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// don't add the player in firstperson mode
|
||||||
|
if( RP_LOCALCLIENT( ent ))
|
||||||
|
{
|
||||||
|
cl.local.apply_effects = true;
|
||||||
|
|
||||||
|
if( !CL_IsThirdPerson( ) && ( ent->index == cl.viewentity ))
|
||||||
|
{
|
||||||
|
// we don't draw player in default renderer in firstperson mode
|
||||||
|
// but let the client.dll know about player entity anyway
|
||||||
|
// for use in custom renderers
|
||||||
|
draw_player = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// check for adding this entity
|
// check for adding this entity
|
||||||
if( !clgame.dllFuncs.pfnAddEntity( entityType, ent, ent->model->name ))
|
if( !clgame.dllFuncs.pfnAddEntity( entityType, ent, ent->model->name ))
|
||||||
{
|
{
|
||||||
@@ -928,28 +1023,23 @@ qboolean CL_AddVisibleEntity( cl_entity_t *ent, int entityType )
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// don't add the player in firstperson mode
|
if( !draw_player )
|
||||||
if( RP_LOCALCLIENT( ent ) && !CL_IsThirdPerson( ) && ( ent->index == cl.viewentity ))
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( entityType == ET_BEAM )
|
if( entityType == ET_BEAM )
|
||||||
{
|
{
|
||||||
CL_AddCustomBeam( ent );
|
ref.dllFuncs.CL_AddCustomBeam( ent );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if( !R_AddEntity( ent, entityType ))
|
else if( !ref.dllFuncs.R_AddEntity( ent, entityType ))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// because pTemp->entity.curstate.effects
|
// because pTemp->entity.curstate.effects
|
||||||
// is already occupied by FTENT_FLICKER
|
// is already occupied by FTENT_FLICKER
|
||||||
if( entityType != ET_TEMPENTITY )
|
if( entityType != ET_TEMPENTITY && !RP_LOCALCLIENT( ent ) )
|
||||||
{
|
{
|
||||||
// no reason to do it twice
|
|
||||||
if( RP_LOCALCLIENT( ent ))
|
|
||||||
cl.local.apply_effects = false;
|
|
||||||
|
|
||||||
// apply client-side effects
|
// apply client-side effects
|
||||||
CL_AddEntityEffects( ent );
|
CL_AddEntityEffects( ent );
|
||||||
|
|
||||||
@@ -967,7 +1057,7 @@ CL_LinkCustomEntity
|
|||||||
Add server beam to draw list
|
Add server beam to draw list
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
void CL_LinkCustomEntity( cl_entity_t *ent, entity_state_t *state )
|
static void CL_LinkCustomEntity( cl_entity_t *ent, entity_state_t *state )
|
||||||
{
|
{
|
||||||
ent->curstate.movetype = state->modelindex; // !!!
|
ent->curstate.movetype = state->modelindex; // !!!
|
||||||
|
|
||||||
@@ -990,7 +1080,7 @@ Create visible entities in the correct position
|
|||||||
for all current players
|
for all current players
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
void CL_LinkPlayers( frame_t *frame )
|
static void CL_LinkPlayers( frame_t *frame )
|
||||||
{
|
{
|
||||||
entity_state_t *state;
|
entity_state_t *state;
|
||||||
cl_entity_t *ent;
|
cl_entity_t *ent;
|
||||||
@@ -1001,7 +1091,6 @@ void CL_LinkPlayers( frame_t *frame )
|
|||||||
// apply muzzleflash to weaponmodel
|
// apply muzzleflash to weaponmodel
|
||||||
if( ent && FBitSet( ent->curstate.effects, EF_MUZZLEFLASH ))
|
if( ent && FBitSet( ent->curstate.effects, EF_MUZZLEFLASH ))
|
||||||
SetBits( clgame.viewent.curstate.effects, EF_MUZZLEFLASH );
|
SetBits( clgame.viewent.curstate.effects, EF_MUZZLEFLASH );
|
||||||
cl.local.apply_effects = true;
|
|
||||||
|
|
||||||
// check all the clients but add only visible
|
// check all the clients but add only visible
|
||||||
for( i = 0, state = frame->playerstate; i < MAX_CLIENTS; i++, state++ )
|
for( i = 0, state = frame->playerstate; i < MAX_CLIENTS; i++, state++ )
|
||||||
@@ -1040,6 +1129,9 @@ void CL_LinkPlayers( frame_t *frame )
|
|||||||
|
|
||||||
if ( i == cl.playernum )
|
if ( i == cl.playernum )
|
||||||
{
|
{
|
||||||
|
// using interpolation only for local player angles
|
||||||
|
CL_ComputePlayerOrigin( ent );
|
||||||
|
|
||||||
if( cls.demoplayback == DEMO_QUAKE1 )
|
if( cls.demoplayback == DEMO_QUAKE1 )
|
||||||
VectorLerp( ent->prevstate.origin, cl.lerpFrac, ent->curstate.origin, cl.simorg );
|
VectorLerp( ent->prevstate.origin, cl.lerpFrac, ent->curstate.origin, cl.simorg );
|
||||||
VectorCopy( cl.simorg, ent->origin );
|
VectorCopy( cl.simorg, ent->origin );
|
||||||
@@ -1071,7 +1163,7 @@ CL_LinkPacketEntities
|
|||||||
|
|
||||||
===============
|
===============
|
||||||
*/
|
*/
|
||||||
void CL_LinkPacketEntities( frame_t *frame )
|
static void CL_LinkPacketEntities( frame_t *frame )
|
||||||
{
|
{
|
||||||
cl_entity_t *ent;
|
cl_entity_t *ent;
|
||||||
entity_state_t *state;
|
entity_state_t *state;
|
||||||
@@ -1109,7 +1201,7 @@ void CL_LinkPacketEntities( frame_t *frame )
|
|||||||
if( ent->curstate.rendermode == kRenderNormal )
|
if( ent->curstate.rendermode == kRenderNormal )
|
||||||
{
|
{
|
||||||
// auto 'solid' faces
|
// auto 'solid' faces
|
||||||
if( FBitSet( ent->model->flags, MODEL_TRANSPARENT ) && CL_IsQuakeCompatible( ))
|
if( FBitSet( ent->model->flags, MODEL_TRANSPARENT ) && Host_IsQuakeCompatible( ))
|
||||||
{
|
{
|
||||||
ent->curstate.rendermode = kRenderTransAlpha;
|
ent->curstate.rendermode = kRenderTransAlpha;
|
||||||
ent->curstate.renderamt = 255;
|
ent->curstate.renderamt = 255;
|
||||||
@@ -1136,17 +1228,33 @@ void CL_LinkPacketEntities( frame_t *frame )
|
|||||||
#else
|
#else
|
||||||
if( ent->lastmove >= cl.time )
|
if( ent->lastmove >= cl.time )
|
||||||
{
|
{
|
||||||
|
float at = ent->curstate.animtime;
|
||||||
|
|
||||||
CL_ResetLatchedVars( ent, true );
|
CL_ResetLatchedVars( ent, true );
|
||||||
|
|
||||||
|
if( cl_fixmodelinterpolationartifacts.value )
|
||||||
|
ent->latched.prevanimtime = ent->curstate.animtime = at;
|
||||||
|
|
||||||
VectorCopy( ent->curstate.origin, ent->latched.prevorigin );
|
VectorCopy( ent->curstate.origin, ent->latched.prevorigin );
|
||||||
VectorCopy( ent->curstate.angles, ent->latched.prevangles );
|
VectorCopy( ent->curstate.angles, ent->latched.prevangles );
|
||||||
|
|
||||||
// disable step interpolation in client.dll
|
if( !FBitSet( host.features, ENGINE_COMPUTE_STUDIO_LERP ))
|
||||||
ent->curstate.movetype = MOVETYPE_NONE;
|
{
|
||||||
|
// disable step interpolation in client.dll
|
||||||
|
ent->curstate.movetype = MOVETYPE_NONE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// restore step interpolation in client.dll
|
if( FBitSet( host.features, ENGINE_COMPUTE_STUDIO_LERP ))
|
||||||
ent->curstate.movetype = MOVETYPE_STEP;
|
{
|
||||||
|
interpolate = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// restore step interpolation in client.dll
|
||||||
|
ent->curstate.movetype = MOVETYPE_STEP;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -1171,11 +1279,24 @@ void CL_LinkPacketEntities( frame_t *frame )
|
|||||||
if ( !CL_InterpolateModel( ent ))
|
if ( !CL_InterpolateModel( ent ))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if( ent->curstate.movetype == MOVETYPE_STEP && !NET_IsLocalAddress( cls.netchan.remote_address ))
|
// a1ba: in GoldSrc this is done for cstrike and czero
|
||||||
|
// but let modders use this as an engine feature
|
||||||
|
else if( FBitSet( host.features, ENGINE_STEP_POSHISTORY_LERP ) &&
|
||||||
|
ent->curstate.movetype == MOVETYPE_STEP && !NET_IsLocalAddress( cls.netchan.remote_address ))
|
||||||
{
|
{
|
||||||
if( !CL_InterpolateModel( ent ))
|
if( !CL_InterpolateModel( ent ))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
|
// ABSOLUTELY STUPID HACK TO ALLOW MONSTERS
|
||||||
|
// INTERPOLATION IN GRAVGUNMOD COOP
|
||||||
|
// MUST BE REMOVED ONCE WE REMOVE 48 PROTO SUPPORT
|
||||||
|
else if( cls.legacymode && ent->model->type == mod_studio && ent->curstate.movetype == MOVETYPE_TOSS )
|
||||||
|
{
|
||||||
|
if( !CL_InterpolateModel( ent ))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// no interpolation right now
|
// no interpolation right now
|
||||||
@@ -1186,7 +1307,7 @@ void CL_LinkPacketEntities( frame_t *frame )
|
|||||||
if( ent->model->type == mod_studio )
|
if( ent->model->type == mod_studio )
|
||||||
{
|
{
|
||||||
if( interpolate && FBitSet( host.features, ENGINE_COMPUTE_STUDIO_LERP ))
|
if( interpolate && FBitSet( host.features, ENGINE_COMPUTE_STUDIO_LERP ))
|
||||||
R_StudioLerpMovement( ent, cl.time, ent->origin, ent->angles );
|
ref.dllFuncs.R_StudioLerpMovement( ent, cl.time, ent->origin, ent->angles );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1257,8 +1378,6 @@ void CL_EmitEntities( void )
|
|||||||
{
|
{
|
||||||
if( cl.paused ) return; // don't waste time
|
if( cl.paused ) return; // don't waste time
|
||||||
|
|
||||||
R_ClearScene ();
|
|
||||||
|
|
||||||
// not in server yet, no entities to redraw
|
// not in server yet, no entities to redraw
|
||||||
if( cls.state != ca_active || !cl.validsequence )
|
if( cls.state != ca_active || !cl.validsequence )
|
||||||
return;
|
return;
|
||||||
@@ -1268,7 +1387,7 @@ void CL_EmitEntities( void )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// animate lightestyles
|
// animate lightestyles
|
||||||
CL_RunLightStyles ();
|
ref.dllFuncs.CL_RunLightStyles ();
|
||||||
|
|
||||||
// decay dynamic lights
|
// decay dynamic lights
|
||||||
CL_DecayLights ();
|
CL_DecayLights ();
|
||||||
@@ -1279,9 +1398,7 @@ void CL_EmitEntities( void )
|
|||||||
// set client ideal pitch when mlook is disabled
|
// set client ideal pitch when mlook is disabled
|
||||||
CL_SetIdealPitch ();
|
CL_SetIdealPitch ();
|
||||||
|
|
||||||
// clear the scene befor start new frame
|
ref.dllFuncs.R_ClearScene ();
|
||||||
if( clgame.drawFuncs.R_ClearScene != NULL )
|
|
||||||
clgame.drawFuncs.R_ClearScene();
|
|
||||||
|
|
||||||
// link all the visible clients first
|
// link all the visible clients first
|
||||||
CL_LinkPlayers ( &cl.frames[cl.parsecountmod] );
|
CL_LinkPlayers ( &cl.frames[cl.parsecountmod] );
|
||||||
@@ -1325,7 +1442,7 @@ qboolean CL_GetEntitySpatialization( channel_t *ch )
|
|||||||
|
|
||||||
if(( ch->entnum - 1 ) == cl.playernum )
|
if(( ch->entnum - 1 ) == cl.playernum )
|
||||||
{
|
{
|
||||||
VectorCopy( RI.vieworg, ch->origin );
|
VectorCopy( refState.vieworg, ch->origin );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1333,27 +1450,19 @@ qboolean CL_GetEntitySpatialization( channel_t *ch )
|
|||||||
ent = CL_GetEntityByIndex( ch->entnum );
|
ent = CL_GetEntityByIndex( ch->entnum );
|
||||||
|
|
||||||
// entity is not present on the client but has valid origin
|
// entity is not present on the client but has valid origin
|
||||||
if( !ent || !ent->index || ent->curstate.messagenum == 0 )
|
if( !ent || !ent->model || ent->curstate.messagenum != cl.parsecount )
|
||||||
return valid_origin;
|
return valid_origin;
|
||||||
|
|
||||||
#if 0
|
|
||||||
// uncomment this if you want enable additional check by PVS
|
|
||||||
if( ent->curstate.messagenum != cl.parsecount )
|
|
||||||
return valid_origin;
|
|
||||||
#endif
|
|
||||||
ch->movetype = ent->curstate.movetype;
|
|
||||||
|
|
||||||
// setup origin
|
// setup origin
|
||||||
VectorAverage( ent->curstate.mins, ent->curstate.maxs, ch->origin );
|
if( ent->model->type == mod_brush )
|
||||||
VectorAdd( ch->origin, ent->curstate.origin, ch->origin );
|
{
|
||||||
|
VectorAverage( ent->model->mins, ent->model->maxs, ch->origin );
|
||||||
// setup mins\maxs
|
VectorAdd( ent->origin, ch->origin, ch->origin );
|
||||||
VectorAdd( ent->curstate.mins, ent->curstate.origin, ch->absmin );
|
}
|
||||||
VectorAdd( ent->curstate.maxs, ent->curstate.origin, ch->absmax );
|
else
|
||||||
|
{
|
||||||
// setup radius
|
VectorCopy( ent->origin, ch->origin );
|
||||||
if( ent->model != NULL && ent->model->radius ) ch->radius = ent->model->radius;
|
}
|
||||||
else ch->radius = RadiusFromBounds( ent->curstate.mins, ent->curstate.maxs );
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1371,18 +1480,15 @@ qboolean CL_GetMovieSpatialization( rawchan_t *ch )
|
|||||||
return valid_origin;
|
return valid_origin;
|
||||||
|
|
||||||
// setup origin
|
// setup origin
|
||||||
VectorAverage( ent->curstate.mins, ent->curstate.maxs, ch->origin );
|
if( ent->model->type == mod_brush )
|
||||||
VectorAdd( ch->origin, ent->curstate.origin, ch->origin );
|
{
|
||||||
|
VectorAverage( ent->model->mins, ent->model->maxs, ch->origin );
|
||||||
// setup radius
|
VectorAdd( ent->origin, ch->origin, ch->origin );
|
||||||
if( ent->model != NULL && ent->model->radius ) ch->radius = ent->model->radius;
|
}
|
||||||
else ch->radius = RadiusFromBounds( ent->curstate.mins, ent->curstate.maxs );
|
else
|
||||||
|
{
|
||||||
|
VectorCopy( ent->origin, ch->origin );
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CL_ExtraUpdate( void )
|
|
||||||
{
|
|
||||||
clgame.dllFuncs.IN_Accumulate();
|
|
||||||
S_ExtraUpdate();
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
145
engine/client/cl_mobile.c
Normal file
145
engine/client/cl_mobile.c
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
/*
|
||||||
|
cl_mobile.c - common mobile interface
|
||||||
|
Copyright (C) 2015 a1batross
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "mobility_int.h"
|
||||||
|
#include "library.h"
|
||||||
|
#include "input.h"
|
||||||
|
#include "platform/platform.h"
|
||||||
|
|
||||||
|
static mobile_engfuncs_t *gMobileEngfuncs;
|
||||||
|
|
||||||
|
static CVAR_DEFINE_AUTO( vibration_length, "1.0", FCVAR_ARCHIVE | FCVAR_PRIVILEGED, "vibration length" );
|
||||||
|
static CVAR_DEFINE_AUTO( vibration_enable, "1", FCVAR_ARCHIVE | FCVAR_PRIVILEGED, "enable vibration" );
|
||||||
|
|
||||||
|
static cl_font_t g_scaled_font;
|
||||||
|
static float g_font_scale;
|
||||||
|
|
||||||
|
static void pfnVibrate( float life, char flags )
|
||||||
|
{
|
||||||
|
if( !vibration_enable.value )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if( life < 0.0f )
|
||||||
|
{
|
||||||
|
Con_Reportf( S_WARN "Negative vibrate time: %f\n", life );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Con_Reportf( "Vibrate: %f %d\n", life, flags );
|
||||||
|
|
||||||
|
// here goes platform-specific backends
|
||||||
|
Platform_Vibrate( life * vibration_length.value, flags );
|
||||||
|
}
|
||||||
|
|
||||||
|
static void Vibrate_f( void )
|
||||||
|
{
|
||||||
|
if( Cmd_Argc() != 2 )
|
||||||
|
{
|
||||||
|
Msg( S_USAGE "vibrate <time>\n" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
pfnVibrate( Q_atof( Cmd_Argv(1) ), VIBRATE_NORMAL );
|
||||||
|
}
|
||||||
|
|
||||||
|
static void pfnEnableTextInput( int enable )
|
||||||
|
{
|
||||||
|
Key_EnableTextInput( enable, false );
|
||||||
|
}
|
||||||
|
|
||||||
|
static int pfnDrawScaledCharacter( int x, int y, int number, int r, int g, int b, float scale )
|
||||||
|
{
|
||||||
|
// this call is very ineffective and possibly broken!
|
||||||
|
rgba_t color = { r, g, b, 255 };
|
||||||
|
int flags = FONT_DRAW_HUD;
|
||||||
|
|
||||||
|
if( hud_utf8.value )
|
||||||
|
SetBits( flags, FONT_DRAW_UTF8 );
|
||||||
|
|
||||||
|
if( fabs( g_font_scale - scale ) > 0.1f ||
|
||||||
|
g_scaled_font.hFontTexture != cls.creditsFont.hFontTexture )
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
g_scaled_font = cls.creditsFont;
|
||||||
|
g_scaled_font.scale *= scale;
|
||||||
|
g_scaled_font.charHeight *= scale;
|
||||||
|
for( i = 0; i < ARRAYSIZE( g_scaled_font.charWidths ); i++ )
|
||||||
|
g_scaled_font.charWidths[i] *= scale;
|
||||||
|
|
||||||
|
g_font_scale = scale;
|
||||||
|
}
|
||||||
|
|
||||||
|
return CL_DrawCharacter( x, y, number, color, &g_scaled_font, flags );
|
||||||
|
}
|
||||||
|
|
||||||
|
static void pfnTouch_HideButtons( const char *name, byte state )
|
||||||
|
{
|
||||||
|
Touch_HideButtons( name, state, true );
|
||||||
|
}
|
||||||
|
|
||||||
|
static void pfnTouch_RemoveButton( const char *name )
|
||||||
|
{
|
||||||
|
Touch_RemoveButton( name, true );
|
||||||
|
}
|
||||||
|
|
||||||
|
static char *pfnParseFileSafe( char *data, char *buf, const int size, unsigned int flags, int *len )
|
||||||
|
{
|
||||||
|
return COM_ParseFileSafe( data, buf, size, flags, len, NULL );
|
||||||
|
}
|
||||||
|
|
||||||
|
static mobile_engfuncs_t gpMobileEngfuncs =
|
||||||
|
{
|
||||||
|
MOBILITY_API_VERSION,
|
||||||
|
pfnVibrate,
|
||||||
|
pfnEnableTextInput,
|
||||||
|
Touch_AddClientButton,
|
||||||
|
Touch_AddDefaultButton,
|
||||||
|
pfnTouch_HideButtons,
|
||||||
|
pfnTouch_RemoveButton,
|
||||||
|
Touch_SetClientOnly,
|
||||||
|
Touch_ResetDefaultButtons,
|
||||||
|
pfnDrawScaledCharacter,
|
||||||
|
Sys_Warn,
|
||||||
|
Sys_GetNativeObject,
|
||||||
|
ID_SetCustomClientID,
|
||||||
|
pfnParseFileSafe
|
||||||
|
};
|
||||||
|
|
||||||
|
qboolean Mobile_Init( void )
|
||||||
|
{
|
||||||
|
qboolean success = false;
|
||||||
|
pfnMobilityInterface ExportToClient;
|
||||||
|
|
||||||
|
// find a mobility interface
|
||||||
|
ExportToClient = COM_GetProcAddress( clgame.hInstance, MOBILITY_CLIENT_EXPORT );
|
||||||
|
gMobileEngfuncs = &gpMobileEngfuncs;
|
||||||
|
|
||||||
|
if( ExportToClient && !ExportToClient( gMobileEngfuncs ) )
|
||||||
|
success = true;
|
||||||
|
|
||||||
|
Cmd_AddCommand( "vibrate", (xcommand_t)Vibrate_f, "Vibrate for specified time");
|
||||||
|
Cvar_RegisterVariable( &vibration_length );
|
||||||
|
Cvar_RegisterVariable( &vibration_enable );
|
||||||
|
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Mobile_Shutdown( void )
|
||||||
|
{
|
||||||
|
Cmd_RemoveCommand( "vibrate" );
|
||||||
|
}
|
||||||
@@ -15,24 +15,30 @@ GNU General Public License for more details.
|
|||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "gl_local.h"
|
#include "kbutton.h"
|
||||||
|
|
||||||
|
#if XASH_LOW_MEMORY == 0
|
||||||
#define NET_TIMINGS 1024
|
#define NET_TIMINGS 1024
|
||||||
|
#elif XASH_LOW_MEMORY == 1
|
||||||
|
#define NET_TIMINGS 256
|
||||||
|
#elif XASH_LOW_MEMORY == 2
|
||||||
|
#define NET_TIMINGS 64
|
||||||
|
#endif
|
||||||
#define NET_TIMINGS_MASK (NET_TIMINGS - 1)
|
#define NET_TIMINGS_MASK (NET_TIMINGS - 1)
|
||||||
#define LATENCY_AVG_FRAC 0.5
|
#define LATENCY_AVG_FRAC 0.5f
|
||||||
#define FRAMERATE_AVG_FRAC 0.5
|
#define FRAMERATE_AVG_FRAC 0.5f
|
||||||
#define PACKETLOSS_AVG_FRAC 0.5
|
#define PACKETLOSS_AVG_FRAC 0.5f
|
||||||
#define PACKETCHOKE_AVG_FRAC 0.5
|
#define PACKETCHOKE_AVG_FRAC 0.5f
|
||||||
#define NETGRAPH_LERP_HEIGHT 24
|
#define NETGRAPH_LERP_HEIGHT 24
|
||||||
#define NETGRAPH_NET_COLORS 5
|
#define NETGRAPH_NET_COLORS 5
|
||||||
#define NUM_LATENCY_SAMPLES 8
|
#define NUM_LATENCY_SAMPLES 8
|
||||||
|
|
||||||
convar_t *net_graph;
|
CVAR_DEFINE_AUTO( net_graph, "0", FCVAR_ARCHIVE, "draw network usage graph" );
|
||||||
convar_t *net_graphpos;
|
static CVAR_DEFINE_AUTO( net_graphpos, "1", FCVAR_ARCHIVE, "network usage graph position" );
|
||||||
convar_t *net_graphwidth;
|
static CVAR_DEFINE_AUTO( net_scale, "5", FCVAR_ARCHIVE, "network usage graph scale level" );
|
||||||
convar_t *net_graphheight;
|
static CVAR_DEFINE_AUTO( net_graphwidth, "192", FCVAR_ARCHIVE, "network usage graph width" );
|
||||||
convar_t *net_graphsolid;
|
static CVAR_DEFINE_AUTO( net_graphheight, "64", FCVAR_ARCHIVE, "network usage graph height" );
|
||||||
convar_t *net_scale;
|
static CVAR_DEFINE_AUTO( net_graphsolid, "1", FCVAR_ARCHIVE, "fill segments in network usage graph" );
|
||||||
|
|
||||||
static struct packet_latency_t
|
static struct packet_latency_t
|
||||||
{
|
{
|
||||||
@@ -75,12 +81,12 @@ NetGraph_FillRGBA shortcut
|
|||||||
*/
|
*/
|
||||||
static void NetGraph_DrawRect( wrect_t *rect, byte colors[4] )
|
static void NetGraph_DrawRect( wrect_t *rect, byte colors[4] )
|
||||||
{
|
{
|
||||||
pglColor4ubv( colors ); // color for this quad
|
ref.dllFuncs.Color4ub( colors[0], colors[1], colors[2], colors[3] ); // color for this quad
|
||||||
|
|
||||||
pglVertex2f( rect->left, rect->top );
|
ref.dllFuncs.Vertex3f( rect->left, rect->top, 0 );
|
||||||
pglVertex2f( rect->left + rect->right, rect->top );
|
ref.dllFuncs.Vertex3f( rect->left + rect->right, rect->top, 0 );
|
||||||
pglVertex2f( rect->left + rect->right, rect->top + rect->bottom );
|
ref.dllFuncs.Vertex3f( rect->left + rect->right, rect->top + rect->bottom, 0 );
|
||||||
pglVertex2f( rect->left, rect->top + rect->bottom );
|
ref.dllFuncs.Vertex3f( rect->left, rect->top + rect->bottom, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -90,7 +96,7 @@ NetGraph_AtEdge
|
|||||||
edge detect
|
edge detect
|
||||||
==========
|
==========
|
||||||
*/
|
*/
|
||||||
qboolean NetGraph_AtEdge( int x, int width )
|
static qboolean NetGraph_AtEdge( int x, int width )
|
||||||
{
|
{
|
||||||
if( x > 3 )
|
if( x > 3 )
|
||||||
{
|
{
|
||||||
@@ -108,7 +114,7 @@ NetGraph_InitColors
|
|||||||
init netgraph colors
|
init netgraph colors
|
||||||
==========
|
==========
|
||||||
*/
|
*/
|
||||||
void NetGraph_InitColors( void )
|
static void NetGraph_InitColors( void )
|
||||||
{
|
{
|
||||||
byte mincolor[2][3];
|
byte mincolor[2][3];
|
||||||
byte maxcolor[2][3];
|
byte maxcolor[2][3];
|
||||||
@@ -152,6 +158,7 @@ void NetGraph_InitColors( void )
|
|||||||
f = (float)(i - hfrac) / (float)(NETGRAPH_LERP_HEIGHT - hfrac );
|
f = (float)(i - hfrac) / (float)(NETGRAPH_LERP_HEIGHT - hfrac );
|
||||||
VectorMA( mincolor[1], f, dc[1], netcolors[NETGRAPH_NET_COLORS + i] );
|
VectorMA( mincolor[1], f, dc[1], netcolors[NETGRAPH_NET_COLORS + i] );
|
||||||
}
|
}
|
||||||
|
netcolors[NETGRAPH_NET_COLORS + i][3] = 255;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,7 +169,7 @@ NetGraph_GetFrameData
|
|||||||
get frame data info, like chokes, packet losses, also update graph, packet and cmdinfo
|
get frame data info, like chokes, packet losses, also update graph, packet and cmdinfo
|
||||||
==========
|
==========
|
||||||
*/
|
*/
|
||||||
void NetGraph_GetFrameData( float *latency, int *latency_count )
|
static void NetGraph_GetFrameData( float *latency, int *latency_count )
|
||||||
{
|
{
|
||||||
int i, choke_count = 0, loss_count = 0;
|
int i, choke_count = 0, loss_count = 0;
|
||||||
double newtime = Sys_DoubleTime();
|
double newtime = Sys_DoubleTime();
|
||||||
@@ -204,7 +211,7 @@ void NetGraph_GetFrameData( float *latency, int *latency_count )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
int frame_latency = Q_min( 1.0f, f->latency );
|
int frame_latency = Q_min( 1.0f, f->latency );
|
||||||
p->latency = (( frame_latency + 0.1 ) / 1.1 ) * ( net_graphheight->value - NETGRAPH_LERP_HEIGHT - 2 );
|
p->latency = (( frame_latency + 0.1f ) / 1.1f ) * ( net_graphheight.value - NETGRAPH_LERP_HEIGHT - 2 );
|
||||||
|
|
||||||
if( i > cls.netchan.incoming_sequence - NUM_LATENCY_SAMPLES )
|
if( i > cls.netchan.incoming_sequence - NUM_LATENCY_SAMPLES )
|
||||||
{
|
{
|
||||||
@@ -230,12 +237,12 @@ void NetGraph_GetFrameData( float *latency, int *latency_count )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// packet loss
|
// packet loss
|
||||||
loss = 100.0 * (float)loss_count / CL_UPDATE_BACKUP;
|
loss = 100.0f * (float)loss_count / CL_UPDATE_BACKUP;
|
||||||
packet_loss = PACKETLOSS_AVG_FRAC * packet_loss + ( 1.0 - PACKETLOSS_AVG_FRAC ) * loss;
|
packet_loss = PACKETLOSS_AVG_FRAC * packet_loss + ( 1.0f - PACKETLOSS_AVG_FRAC ) * loss;
|
||||||
|
|
||||||
// packet choke
|
// packet choke
|
||||||
choke = 100.0 * (float)choke_count / CL_UPDATE_BACKUP;
|
choke = 100.0f * (float)choke_count / CL_UPDATE_BACKUP;
|
||||||
packet_choke = PACKETCHOKE_AVG_FRAC * packet_choke + ( 1.0 - PACKETCHOKE_AVG_FRAC ) * choke;
|
packet_choke = PACKETCHOKE_AVG_FRAC * packet_choke + ( 1.0f - PACKETCHOKE_AVG_FRAC ) * choke;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -244,7 +251,7 @@ NetGraph_DrawTimes
|
|||||||
|
|
||||||
===========
|
===========
|
||||||
*/
|
*/
|
||||||
void NetGraph_DrawTimes( wrect_t rect, int x, int w )
|
static void NetGraph_DrawTimes( wrect_t rect, int x, int w )
|
||||||
{
|
{
|
||||||
int i, j, extrap_point = NETGRAPH_LERP_HEIGHT / 3, a, h;
|
int i, j, extrap_point = NETGRAPH_LERP_HEIGHT / 3, a, h;
|
||||||
rgba_t colors = { 0.9 * 255, 0.9 * 255, 0.7 * 255, 255 };
|
rgba_t colors = { 0.9 * 255, 0.9 * 255, 0.7 * 255, 255 };
|
||||||
@@ -253,7 +260,7 @@ void NetGraph_DrawTimes( wrect_t rect, int x, int w )
|
|||||||
for( a = 0; a < w; a++ )
|
for( a = 0; a < w; a++ )
|
||||||
{
|
{
|
||||||
i = ( cls.netchan.outgoing_sequence - a ) & NET_TIMINGS_MASK;
|
i = ( cls.netchan.outgoing_sequence - a ) & NET_TIMINGS_MASK;
|
||||||
h = ( netstat_cmdinfo[i].cmd_lerp / 3.0f ) * NETGRAPH_LERP_HEIGHT;
|
h = Q_min(( netstat_cmdinfo[i].cmd_lerp / 3.0f ) * NETGRAPH_LERP_HEIGHT, net_graphheight.value * 0.7f);
|
||||||
|
|
||||||
fill.left = x + w - a - 1;
|
fill.left = x + w - a - 1;
|
||||||
fill.right = fill.bottom = 1;
|
fill.right = fill.bottom = 1;
|
||||||
@@ -266,7 +273,7 @@ void NetGraph_DrawTimes( wrect_t rect, int x, int w )
|
|||||||
h -= extrap_point;
|
h -= extrap_point;
|
||||||
fill.top -= extrap_point;
|
fill.top -= extrap_point;
|
||||||
|
|
||||||
if( !net_graphsolid->value )
|
if( !net_graphsolid.value )
|
||||||
{
|
{
|
||||||
fill.top -= (h - 1);
|
fill.top -= (h - 1);
|
||||||
start = (h - 1);
|
start = (h - 1);
|
||||||
@@ -274,7 +281,10 @@ void NetGraph_DrawTimes( wrect_t rect, int x, int w )
|
|||||||
|
|
||||||
for( j = start; j < h; j++ )
|
for( j = start; j < h; j++ )
|
||||||
{
|
{
|
||||||
NetGraph_DrawRect( &fill, netcolors[NETGRAPH_NET_COLORS + j + extrap_point] );
|
int color = NETGRAPH_NET_COLORS + j + extrap_point;
|
||||||
|
color = Q_min( color, ARRAYSIZE( netcolors ) - 1 );
|
||||||
|
|
||||||
|
NetGraph_DrawRect( &fill, netcolors[color] );
|
||||||
fill.top--;
|
fill.top--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -285,12 +295,15 @@ void NetGraph_DrawTimes( wrect_t rect, int x, int w )
|
|||||||
fill.top -= h;
|
fill.top -= h;
|
||||||
h = extrap_point - h;
|
h = extrap_point - h;
|
||||||
|
|
||||||
if( !net_graphsolid->value )
|
if( !net_graphsolid.value )
|
||||||
h = 1;
|
h = 1;
|
||||||
|
|
||||||
for( j = 0; j < h; j++ )
|
for( j = 0; j < h; j++ )
|
||||||
{
|
{
|
||||||
NetGraph_DrawRect( &fill, netcolors[NETGRAPH_NET_COLORS + j + oldh] );
|
int color = NETGRAPH_NET_COLORS + j + oldh;
|
||||||
|
color = Q_min( color, ARRAYSIZE( netcolors ) - 1 );
|
||||||
|
|
||||||
|
NetGraph_DrawRect( &fill, netcolors[color] );
|
||||||
fill.top--;
|
fill.top--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -319,9 +332,9 @@ NetGraph_DrawHatches
|
|||||||
|
|
||||||
===========
|
===========
|
||||||
*/
|
*/
|
||||||
void NetGraph_DrawHatches( int x, int y )
|
static void NetGraph_DrawHatches( int x, int y )
|
||||||
{
|
{
|
||||||
int ystep = (int)( 10.0f / net_scale->value );
|
int ystep = (int)( 10.0f / net_scale.value );
|
||||||
byte colorminor[4] = { 0, 63, 63, 200 };
|
byte colorminor[4] = { 0, 63, 63, 200 };
|
||||||
byte color[4] = { 0, 200, 0, 255 };
|
byte color[4] = { 0, 200, 0, 255 };
|
||||||
wrect_t hatch = { x, 4, y, 1 };
|
wrect_t hatch = { x, 4, y, 1 };
|
||||||
@@ -329,9 +342,9 @@ void NetGraph_DrawHatches( int x, int y )
|
|||||||
|
|
||||||
ystep = Q_max( ystep, 1 );
|
ystep = Q_max( ystep, 1 );
|
||||||
|
|
||||||
for( starty = hatch.top; hatch.top > 0 && ((starty - hatch.top) * net_scale->value < (maxmsgbytes + 50)); hatch.top -= ystep )
|
for( starty = hatch.top; hatch.top > 0 && ((starty - hatch.top) * net_scale.value < (maxmsgbytes + 50)); hatch.top -= ystep )
|
||||||
{
|
{
|
||||||
if(!((int)((starty - hatch.top) * net_scale->value ) % 50 ))
|
if(!((int)((starty - hatch.top) * net_scale.value ) % 50 ))
|
||||||
{
|
{
|
||||||
NetGraph_DrawRect( &hatch, color );
|
NetGraph_DrawRect( &hatch, color );
|
||||||
}
|
}
|
||||||
@@ -348,40 +361,42 @@ NetGraph_DrawTextFields
|
|||||||
|
|
||||||
===========
|
===========
|
||||||
*/
|
*/
|
||||||
void NetGraph_DrawTextFields( int x, int y, int w, wrect_t rect, int count, float avg, int packet_loss, int packet_choke )
|
static void NetGraph_DrawTextFields( int x, int y, int w, wrect_t rect, int count, float avg, int packet_loss, int packet_choke, int graphtype )
|
||||||
{
|
{
|
||||||
static int lastout;
|
static int lastout;
|
||||||
|
cl_font_t *font = Con_GetFont( 0 );
|
||||||
rgba_t colors = { 0.9 * 255, 0.9 * 255, 0.7 * 255, 255 };
|
rgba_t colors = { 0.9 * 255, 0.9 * 255, 0.7 * 255, 255 };
|
||||||
int ptx = Q_max( x + w - NETGRAPH_LERP_HEIGHT - 1, 1 );
|
int ptx = Q_max( x + w - NETGRAPH_LERP_HEIGHT - 1, 1 );
|
||||||
int pty = Q_max( rect.top + rect.bottom - NETGRAPH_LERP_HEIGHT - 3, 1 );
|
int pty = Q_max( rect.top + rect.bottom - NETGRAPH_LERP_HEIGHT - 3, 1 );
|
||||||
int out, i = ( cls.netchan.outgoing_sequence - 1 ) & NET_TIMINGS_MASK;
|
int out, i = ( cls.netchan.outgoing_sequence - 1 ) & NET_TIMINGS_MASK;
|
||||||
int j = cls.netchan.incoming_sequence & NET_TIMINGS_MASK;
|
int j = cls.netchan.incoming_sequence & NET_TIMINGS_MASK;
|
||||||
int last_y = y - net_graphheight->value;
|
int last_y = y - net_graphheight.value;
|
||||||
|
|
||||||
if( count > 0 )
|
if( count > 0 )
|
||||||
{
|
{
|
||||||
avg = avg / (float)( count - ( host.frametime * FRAMERATE_AVG_FRAC ));
|
avg = avg / (float)( count - ( host.frametime * FRAMERATE_AVG_FRAC ));
|
||||||
|
|
||||||
if( cl_updaterate->value > 0.0f )
|
if( cl_updaterate.value > 0.0f )
|
||||||
avg -= 1000.0f / cl_updaterate->value;
|
avg -= 1000.0f / cl_updaterate.value;
|
||||||
|
|
||||||
// can't be below zero
|
// can't be below zero
|
||||||
avg = Q_max( 0.0, avg );
|
avg = Q_max( 0.0f, avg );
|
||||||
}
|
}
|
||||||
else avg = 0.0;
|
else avg = 0.0;
|
||||||
|
|
||||||
// move rolling average
|
// move rolling average
|
||||||
framerate = FRAMERATE_AVG_FRAC * host.frametime + ( 1.0 - FRAMERATE_AVG_FRAC ) * framerate;
|
framerate = FRAMERATE_AVG_FRAC * host.frametime + ( 1.0f - FRAMERATE_AVG_FRAC ) * framerate;
|
||||||
Con_SetFont( 0 );
|
|
||||||
|
CL_SetFontRendermode( font );
|
||||||
|
|
||||||
if( framerate > 0.0f )
|
if( framerate > 0.0f )
|
||||||
{
|
{
|
||||||
y -= net_graphheight->value;
|
y -= net_graphheight.value;
|
||||||
|
|
||||||
Con_DrawString( x, y, va( "%.1f fps" , 1.0f / framerate ), colors );
|
CL_DrawStringf( font, x, y, colors, FONT_DRAW_NORENDERMODE, "%.1f fps" , 1.0f / framerate);
|
||||||
|
|
||||||
if( avg > 1.0f )
|
if( avg > 1.0f )
|
||||||
Con_DrawString( x + 75, y, va( "%i ms" , (int)avg ), colors );
|
CL_DrawStringf( font, x + 75, y, colors, FONT_DRAW_NORENDERMODE, "%i ms" , (int)avg );
|
||||||
|
|
||||||
y += 15;
|
y += 15;
|
||||||
|
|
||||||
@@ -389,27 +404,27 @@ void NetGraph_DrawTextFields( int x, int y, int w, wrect_t rect, int count, floa
|
|||||||
if( !out ) out = lastout;
|
if( !out ) out = lastout;
|
||||||
else lastout = out;
|
else lastout = out;
|
||||||
|
|
||||||
Con_DrawString( x, y, va( "in : %i %.2f k/s", netstat_graph[j].msgbytes, cls.netchan.flow[FLOW_INCOMING].avgkbytespersec ), colors );
|
CL_DrawStringf( font, x, y, colors, FONT_DRAW_NORENDERMODE,
|
||||||
|
"in : %i %.2f kb/s", netstat_graph[j].msgbytes, cls.netchan.flow[FLOW_INCOMING].avgkbytespersec );
|
||||||
y += 15;
|
y += 15;
|
||||||
|
|
||||||
Con_DrawString( x, y, va( "out: %i %.2f k/s", out, cls.netchan.flow[FLOW_OUTGOING].avgkbytespersec ), colors );
|
CL_DrawStringf( font, x, y, colors, FONT_DRAW_NORENDERMODE,
|
||||||
|
"out: %i %.2f kb/s", out, cls.netchan.flow[FLOW_OUTGOING].avgkbytespersec );
|
||||||
y += 15;
|
y += 15;
|
||||||
|
|
||||||
if( net_graph->value > 2 )
|
if( graphtype > 2 )
|
||||||
{
|
{
|
||||||
int loss = (int)(( packet_loss + PACKETLOSS_AVG_FRAC ) - 0.01 );
|
int loss = (int)(( packet_loss + PACKETLOSS_AVG_FRAC ) - 0.01f );
|
||||||
int choke = (int)(( packet_choke + PACKETCHOKE_AVG_FRAC ) - 0.01 );
|
int choke = (int)(( packet_choke + PACKETCHOKE_AVG_FRAC ) - 0.01f );
|
||||||
|
|
||||||
Con_DrawString( x, y, va( "loss: %i choke: %i", loss, choke ), colors );
|
CL_DrawStringf( font, x, y, colors, FONT_DRAW_NORENDERMODE, "loss: %i choke: %i", loss, choke );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( net_graph->value < 3 )
|
if( graphtype < 3 )
|
||||||
Con_DrawString( ptx, pty, va( "%i/s", (int)cl_cmdrate->value ), colors );
|
CL_DrawStringf( font, ptx, pty, colors, FONT_DRAW_NORENDERMODE, "%i/s", (int)cl_cmdrate.value );
|
||||||
|
|
||||||
Con_DrawString( ptx, last_y, va( "%i/s" , (int)cl_updaterate->value ), colors );
|
CL_DrawStringf( font, ptx, last_y, colors, FONT_DRAW_NORENDERMODE, "%i/s" , (int)cl_updaterate.value );
|
||||||
|
|
||||||
Con_RestoreFont();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -418,14 +433,14 @@ NetGraph_DrawDataSegment
|
|||||||
|
|
||||||
===========
|
===========
|
||||||
*/
|
*/
|
||||||
int NetGraph_DrawDataSegment( wrect_t *fill, int bytes, byte r, byte g, byte b, byte a )
|
static int NetGraph_DrawDataSegment( wrect_t *fill, int bytes, byte r, byte g, byte b, byte a )
|
||||||
{
|
{
|
||||||
float h = bytes / net_scale->value;
|
float h = bytes / net_scale.value;
|
||||||
byte colors[4] = { r, g, b, a };
|
byte colors[4] = { r, g, b, a };
|
||||||
|
|
||||||
fill->top -= (int)h;
|
fill->top -= (int)h;
|
||||||
|
|
||||||
if( net_graphsolid->value )
|
if( net_graphsolid.value )
|
||||||
fill->bottom = (int)h;
|
fill->bottom = (int)h;
|
||||||
else fill->bottom = 1;
|
else fill->bottom = 1;
|
||||||
|
|
||||||
@@ -445,7 +460,7 @@ NetGraph_ColorForHeight
|
|||||||
color based on packet latency
|
color based on packet latency
|
||||||
===========
|
===========
|
||||||
*/
|
*/
|
||||||
void NetGraph_ColorForHeight( struct packet_latency_t *packet, byte color[4], int *ping )
|
static void NetGraph_ColorForHeight( struct packet_latency_t *packet, byte color[4], int *ping )
|
||||||
{
|
{
|
||||||
switch( packet->latency )
|
switch( packet->latency )
|
||||||
{
|
{
|
||||||
@@ -480,10 +495,10 @@ NetGraph_DrawDataUsage
|
|||||||
|
|
||||||
===========
|
===========
|
||||||
*/
|
*/
|
||||||
void NetGraph_DrawDataUsage( int x, int y, int w )
|
static void NetGraph_DrawDataUsage( int x, int y, int w, int graphtype )
|
||||||
{
|
{
|
||||||
int a, i, h, lastvalidh = 0, ping;
|
int a, i, h, lastvalidh = 0, ping;
|
||||||
int pingheight = net_graphheight->value - NETGRAPH_LERP_HEIGHT - 2;
|
int pingheight = net_graphheight.value - NETGRAPH_LERP_HEIGHT - 2;
|
||||||
wrect_t fill = { 0 };
|
wrect_t fill = { 0 };
|
||||||
byte color[4];
|
byte color[4];
|
||||||
|
|
||||||
@@ -535,11 +550,11 @@ void NetGraph_DrawDataUsage( int x, int y, int w )
|
|||||||
if( NetGraph_AtEdge( a, w ))
|
if( NetGraph_AtEdge( a, w ))
|
||||||
NetGraph_DrawRect( &fill, color );
|
NetGraph_DrawRect( &fill, color );
|
||||||
|
|
||||||
if( net_graph->value < 2 )
|
if( graphtype < 2 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
color[0] = color[1] = color[2] = color[3] = 255;
|
color[0] = color[1] = color[2] = color[3] = 255;
|
||||||
fill.top = y - net_graphheight->value - 1;
|
fill.top = y - net_graphheight.value - 1;
|
||||||
fill.bottom = 1;
|
fill.bottom = 1;
|
||||||
|
|
||||||
if( NetGraph_AtEdge( a, w ))
|
if( NetGraph_AtEdge( a, w ))
|
||||||
@@ -574,7 +589,7 @@ void NetGraph_DrawDataUsage( int x, int y, int w )
|
|||||||
if( !NetGraph_DrawDataSegment( &fill, netstat_graph[i].voicebytes, 255, 255, 255, 255 ))
|
if( !NetGraph_DrawDataSegment( &fill, netstat_graph[i].voicebytes, 255, 255, 255, 255 ))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
fill.top = y - net_graphheight->value - 1;
|
fill.top = y - net_graphheight.value - 1;
|
||||||
fill.bottom = 1;
|
fill.bottom = 1;
|
||||||
fill.top -= 2;
|
fill.top -= 2;
|
||||||
|
|
||||||
@@ -582,8 +597,8 @@ void NetGraph_DrawDataUsage( int x, int y, int w )
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( net_graph->value >= 2 )
|
if( graphtype >= 2 )
|
||||||
NetGraph_DrawHatches( x, y - net_graphheight->value - 1 );
|
NetGraph_DrawHatches( x, y - net_graphheight.value - 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -592,24 +607,24 @@ NetGraph_GetScreenPos
|
|||||||
|
|
||||||
===========
|
===========
|
||||||
*/
|
*/
|
||||||
void NetGraph_GetScreenPos( wrect_t *rect, int *w, int *x, int *y )
|
static void NetGraph_GetScreenPos( wrect_t *rect, int *w, int *x, int *y )
|
||||||
{
|
{
|
||||||
rect->left = rect->top = 0;
|
rect->left = rect->top = 0;
|
||||||
rect->right = glState.width;
|
rect->right = refState.width;
|
||||||
rect->bottom = glState.height;
|
rect->bottom = refState.height;
|
||||||
|
|
||||||
*w = Q_min( NET_TIMINGS, net_graphwidth->value );
|
*w = Q_min( NET_TIMINGS, net_graphwidth.value );
|
||||||
if( rect->right < *w + 10 )
|
if( rect->right < *w + 10 )
|
||||||
*w = rect->right - 10;
|
*w = rect->right - 10;
|
||||||
|
|
||||||
// detect x and y position
|
// detect x and y position
|
||||||
switch( (int)net_graphpos->value )
|
switch( (int)net_graphpos.value )
|
||||||
{
|
{
|
||||||
case 1: // right sided
|
case 1: // right sided
|
||||||
*x = rect->left + rect->right - 5 - *w;
|
*x = rect->left + rect->right - 5 - *w;
|
||||||
break;
|
break;
|
||||||
case 2: // center
|
case 2: // center
|
||||||
*x = rect->left + ( rect->right - 10 - *w ) / 2;
|
*x = ( rect->left + ( rect->right - 10 - *w )) / 2;
|
||||||
break;
|
break;
|
||||||
default: // left sided
|
default: // left sided
|
||||||
*x = rect->left + 5;
|
*x = rect->left + 5;
|
||||||
@@ -631,6 +646,8 @@ void SCR_DrawNetGraph( void )
|
|||||||
float avg_ping;
|
float avg_ping;
|
||||||
int ping_count;
|
int ping_count;
|
||||||
int w, x, y;
|
int w, x, y;
|
||||||
|
kbutton_t *in_graph;
|
||||||
|
int graphtype;
|
||||||
|
|
||||||
if( !host.allow_console )
|
if( !host.allow_console )
|
||||||
return;
|
return;
|
||||||
@@ -638,45 +655,54 @@ void SCR_DrawNetGraph( void )
|
|||||||
if( cls.state != ca_active )
|
if( cls.state != ca_active )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( !net_graph->value )
|
in_graph = clgame.dllFuncs.KB_Find( "in_graph" );
|
||||||
return;
|
|
||||||
|
|
||||||
if( net_scale->value <= 0 )
|
if( in_graph->state & 1 )
|
||||||
|
{
|
||||||
|
graphtype = 2;
|
||||||
|
}
|
||||||
|
else if( net_graph.value != 0.0f )
|
||||||
|
{
|
||||||
|
graphtype = (int)net_graph.value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( net_scale.value <= 0 )
|
||||||
Cvar_SetValue( "net_scale", 0.1f );
|
Cvar_SetValue( "net_scale", 0.1f );
|
||||||
|
|
||||||
NetGraph_GetScreenPos( &rect, &w, &x, &y );
|
NetGraph_GetScreenPos( &rect, &w, &x, &y );
|
||||||
|
|
||||||
NetGraph_GetFrameData( &avg_ping, &ping_count );
|
NetGraph_GetFrameData( &avg_ping, &ping_count );
|
||||||
|
|
||||||
NetGraph_DrawTextFields( x, y, w, rect, ping_count, avg_ping, packet_loss, packet_choke );
|
NetGraph_DrawTextFields( x, y, w, rect, ping_count, avg_ping, packet_loss, packet_choke, graphtype );
|
||||||
|
|
||||||
if( net_graph->value < 3 )
|
if( graphtype < 3 )
|
||||||
{
|
{
|
||||||
pglEnable( GL_BLEND );
|
ref.dllFuncs.GL_SetRenderMode( kRenderTransColor );
|
||||||
pglDisable( GL_TEXTURE_2D );
|
ref.dllFuncs.GL_Bind( XASH_TEXTURE0, R_GetBuiltinTexture( REF_WHITE_TEXTURE ) );
|
||||||
pglTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
|
ref.dllFuncs.Begin( TRI_QUADS ); // draw all the fills as a long solid sequence of quads for speedup reasons
|
||||||
pglBlendFunc( GL_SRC_ALPHA, GL_ONE );
|
|
||||||
pglBegin( GL_QUADS ); // draw all the fills as a long solid sequence of quads for speedup reasons
|
|
||||||
|
|
||||||
// NOTE: fill colors without texture at this point
|
// NOTE: fill colors without texture at this point
|
||||||
NetGraph_DrawDataUsage( x, y, w );
|
NetGraph_DrawDataUsage( x, y, w, graphtype );
|
||||||
NetGraph_DrawTimes( rect, x, w );
|
NetGraph_DrawTimes( rect, x, w );
|
||||||
|
|
||||||
pglEnd();
|
ref.dllFuncs.End();
|
||||||
pglColor4ub( 255, 255, 255, 255 );
|
ref.dllFuncs.Color4ub( 255, 255, 255, 255 );
|
||||||
pglEnable( GL_TEXTURE_2D );
|
ref.dllFuncs.GL_SetRenderMode( kRenderNormal );
|
||||||
pglDisable( GL_BLEND );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CL_InitNetgraph( void )
|
void CL_InitNetgraph( void )
|
||||||
{
|
{
|
||||||
net_graph = Cvar_Get( "net_graph", "0", FCVAR_ARCHIVE, "draw network usage graph" );
|
Cvar_RegisterVariable( &net_graph );
|
||||||
net_graphpos = Cvar_Get( "net_graphpos", "1", FCVAR_ARCHIVE, "network usage graph position" );
|
Cvar_RegisterVariable( &net_graphpos );
|
||||||
net_scale = Cvar_Get( "net_scale", "5", FCVAR_ARCHIVE, "network usage graph scale level" );
|
Cvar_RegisterVariable( &net_scale );
|
||||||
net_graphwidth = Cvar_Get( "net_graphwidth", "192", FCVAR_ARCHIVE, "network usage graph width" );
|
Cvar_RegisterVariable( &net_graphwidth );
|
||||||
net_graphheight = Cvar_Get( "net_graphheight", "64", FCVAR_ARCHIVE, "network usage graph height" );
|
Cvar_RegisterVariable( &net_graphheight );
|
||||||
net_graphsolid = Cvar_Get( "net_graphsolid", "1", FCVAR_ARCHIVE, "fill segments in network usage graph" );
|
Cvar_RegisterVariable( &net_graphsolid );
|
||||||
packet_loss = packet_choke = 0.0;
|
packet_loss = packet_choke = 0.0;
|
||||||
|
|
||||||
NetGraph_InitColors();
|
NetGraph_InitColors();
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
706
engine/client/cl_parse_48.c
Normal file
706
engine/client/cl_parse_48.c
Normal file
@@ -0,0 +1,706 @@
|
|||||||
|
/*
|
||||||
|
cl_parse.c - parse a message received from the server
|
||||||
|
Copyright (C) 2008 Uncle Mike
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "net_encode.h"
|
||||||
|
#include "particledef.h"
|
||||||
|
#include "cl_tent.h"
|
||||||
|
#include "shake.h"
|
||||||
|
#include "hltv.h"
|
||||||
|
#include "input.h"
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
==================
|
||||||
|
CL_ParseStaticEntity
|
||||||
|
|
||||||
|
static client entity
|
||||||
|
==================
|
||||||
|
*/
|
||||||
|
static void CL_LegacyParseStaticEntity( sizebuf_t *msg )
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
entity_state_t state;
|
||||||
|
cl_entity_t *ent;
|
||||||
|
|
||||||
|
memset( &state, 0, sizeof( state ));
|
||||||
|
state.modelindex = MSG_ReadShort( msg );
|
||||||
|
state.sequence = MSG_ReadByte( msg );
|
||||||
|
state.frame = MSG_ReadByte( msg );
|
||||||
|
state.colormap = MSG_ReadWord( msg );
|
||||||
|
state.skin = MSG_ReadByte( msg );
|
||||||
|
|
||||||
|
for( i = 0; i < 3; i++ )
|
||||||
|
{
|
||||||
|
state.origin[i] = MSG_ReadCoord( msg );
|
||||||
|
state.angles[i] = MSG_ReadBitAngle( msg, 16 );
|
||||||
|
}
|
||||||
|
|
||||||
|
state.rendermode = MSG_ReadByte( msg );
|
||||||
|
|
||||||
|
if( state.rendermode != kRenderNormal )
|
||||||
|
{
|
||||||
|
state.renderamt = MSG_ReadByte( msg );
|
||||||
|
state.rendercolor.r = MSG_ReadByte( msg );
|
||||||
|
state.rendercolor.g = MSG_ReadByte( msg );
|
||||||
|
state.rendercolor.b = MSG_ReadByte( msg );
|
||||||
|
state.renderfx = MSG_ReadByte( msg );
|
||||||
|
}
|
||||||
|
|
||||||
|
i = clgame.numStatics;
|
||||||
|
if( i >= MAX_STATIC_ENTITIES )
|
||||||
|
{
|
||||||
|
Con_Printf( S_ERROR "MAX_STATIC_ENTITIES limit exceeded!\n" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ent = &clgame.static_entities[i];
|
||||||
|
clgame.numStatics++;
|
||||||
|
|
||||||
|
// all states are same
|
||||||
|
ent->baseline = ent->curstate = ent->prevstate = state;
|
||||||
|
ent->index = 0; // static entities doesn't has the numbers
|
||||||
|
|
||||||
|
// statics may be respawned in game e.g. for demo recording
|
||||||
|
if( cls.state == ca_connected || cls.state == ca_validate )
|
||||||
|
ent->trivial_accept = INVALID_HANDLE;
|
||||||
|
|
||||||
|
// setup the new static entity
|
||||||
|
VectorCopy( ent->curstate.origin, ent->origin );
|
||||||
|
VectorCopy( ent->curstate.angles, ent->angles );
|
||||||
|
ent->model = CL_ModelHandle( state.modelindex );
|
||||||
|
ent->curstate.framerate = 1.0f;
|
||||||
|
CL_ResetLatchedVars( ent, true );
|
||||||
|
|
||||||
|
if( ent->curstate.rendermode == kRenderNormal && ent->model != NULL )
|
||||||
|
{
|
||||||
|
// auto 'solid' faces
|
||||||
|
if( FBitSet( ent->model->flags, MODEL_TRANSPARENT ) && Host_IsQuakeCompatible( ))
|
||||||
|
{
|
||||||
|
ent->curstate.rendermode = kRenderTransAlpha;
|
||||||
|
ent->curstate.renderamt = 255;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
R_AddEfrags( ent ); // add link
|
||||||
|
}
|
||||||
|
|
||||||
|
static void CL_LegacyParseSoundPacket( sizebuf_t *msg, qboolean is_ambient )
|
||||||
|
{
|
||||||
|
vec3_t pos;
|
||||||
|
int chan, sound;
|
||||||
|
float volume, attn;
|
||||||
|
int flags, pitch, entnum;
|
||||||
|
sound_t handle = 0;
|
||||||
|
|
||||||
|
flags = MSG_ReadWord( msg );
|
||||||
|
if( flags & SND_LEGACY_LARGE_INDEX )
|
||||||
|
{
|
||||||
|
sound = MSG_ReadWord( msg );
|
||||||
|
flags &= ~SND_LEGACY_LARGE_INDEX;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
sound = MSG_ReadByte( msg );
|
||||||
|
chan = MSG_ReadByte( msg );
|
||||||
|
|
||||||
|
if( FBitSet( flags, SND_VOLUME ))
|
||||||
|
volume = (float)MSG_ReadByte( msg ) / 255.0f;
|
||||||
|
else volume = VOL_NORM;
|
||||||
|
|
||||||
|
if( FBitSet( flags, SND_ATTENUATION ))
|
||||||
|
attn = (float)MSG_ReadByte( msg ) / 64.0f;
|
||||||
|
else attn = ATTN_NONE;
|
||||||
|
|
||||||
|
if( FBitSet( flags, SND_PITCH ))
|
||||||
|
pitch = MSG_ReadByte( msg );
|
||||||
|
else pitch = PITCH_NORM;
|
||||||
|
|
||||||
|
// entity reletive
|
||||||
|
entnum = MSG_ReadWord( msg );
|
||||||
|
|
||||||
|
// positioned in space
|
||||||
|
MSG_ReadVec3Coord( msg, pos );
|
||||||
|
|
||||||
|
if( FBitSet( flags, SND_SENTENCE ))
|
||||||
|
{
|
||||||
|
char sentenceName[32];
|
||||||
|
|
||||||
|
//if( FBitSet( flags, SND_SEQUENCE ))
|
||||||
|
//Q_snprintf( sentenceName, sizeof( sentenceName ), "!#%i", sound + MAX_SOUNDS );
|
||||||
|
//else
|
||||||
|
Q_snprintf( sentenceName, sizeof( sentenceName ), "!%i", sound );
|
||||||
|
|
||||||
|
handle = S_RegisterSound( sentenceName );
|
||||||
|
}
|
||||||
|
else handle = cl.sound_index[sound]; // see precached sound
|
||||||
|
|
||||||
|
if( !cl.audio_prepped )
|
||||||
|
return; // too early
|
||||||
|
|
||||||
|
// g-cont. sound and ambient sound have only difference with channel
|
||||||
|
if( is_ambient )
|
||||||
|
{
|
||||||
|
S_AmbientSound( pos, entnum, handle, volume, attn, pitch, flags );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
S_StartSound( pos, entnum, chan, handle, volume, attn, pitch, flags );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
================
|
||||||
|
CL_PrecacheSound
|
||||||
|
|
||||||
|
prceache sound from server
|
||||||
|
================
|
||||||
|
*/
|
||||||
|
static void CL_LegacyPrecacheSound( sizebuf_t *msg )
|
||||||
|
{
|
||||||
|
int soundIndex;
|
||||||
|
|
||||||
|
soundIndex = MSG_ReadUBitLong( msg, MAX_SOUND_BITS );
|
||||||
|
|
||||||
|
if( soundIndex < 0 || soundIndex >= MAX_SOUNDS )
|
||||||
|
Host_Error( "CL_PrecacheSound: bad soundindex %i\n", soundIndex );
|
||||||
|
|
||||||
|
Q_strncpy( cl.sound_precache[soundIndex], MSG_ReadString( msg ), sizeof( cl.sound_precache[0] ));
|
||||||
|
|
||||||
|
// when we loading map all resources is precached sequentially
|
||||||
|
//if( !cl.audio_prepped ) return;
|
||||||
|
|
||||||
|
cl.sound_index[soundIndex] = S_RegisterSound( cl.sound_precache[soundIndex] );
|
||||||
|
}
|
||||||
|
|
||||||
|
static void CL_LegacyPrecacheModel( sizebuf_t *msg )
|
||||||
|
{
|
||||||
|
int modelIndex;
|
||||||
|
string model;
|
||||||
|
|
||||||
|
modelIndex = MSG_ReadUBitLong( msg, MAX_LEGACY_MODEL_BITS );
|
||||||
|
|
||||||
|
if( modelIndex < 0 || modelIndex >= MAX_MODELS )
|
||||||
|
Host_Error( "CL_PrecacheModel: bad modelindex %i\n", modelIndex );
|
||||||
|
|
||||||
|
Q_strncpy( model, MSG_ReadString( msg ), MAX_STRING );
|
||||||
|
//Q_strncpy( cl.model_precache[modelIndex], BF_ReadString( msg ), sizeof( cl.model_precache[0] ));
|
||||||
|
|
||||||
|
// when we loading map all resources is precached sequentially
|
||||||
|
//if( !cl.video_prepped ) return;
|
||||||
|
if( modelIndex == 1 && !cl.worldmodel )
|
||||||
|
{
|
||||||
|
CL_ClearWorld ();
|
||||||
|
|
||||||
|
cl.models[modelIndex] = cl.worldmodel = Mod_LoadWorld( model, true );
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Mod_RegisterModel( cl.model_precache[modelIndex], modelIndex );
|
||||||
|
|
||||||
|
cl.models[modelIndex] = Mod_ForName( model, false, false );
|
||||||
|
cl.nummodels = Q_max( cl.nummodels, modelIndex );
|
||||||
|
}
|
||||||
|
|
||||||
|
static void CL_LegacyPrecacheEvent( sizebuf_t *msg )
|
||||||
|
{
|
||||||
|
int eventIndex;
|
||||||
|
|
||||||
|
eventIndex = MSG_ReadUBitLong( msg, MAX_EVENT_BITS );
|
||||||
|
|
||||||
|
if( eventIndex < 0 || eventIndex >= MAX_EVENTS )
|
||||||
|
Host_Error( "CL_PrecacheEvent: bad eventindex %i\n", eventIndex );
|
||||||
|
|
||||||
|
Q_strncpy( cl.event_precache[eventIndex], MSG_ReadString( msg ), sizeof( cl.event_precache[0] ));
|
||||||
|
|
||||||
|
// can be set now
|
||||||
|
CL_SetEventIndex( cl.event_precache[eventIndex], eventIndex );
|
||||||
|
}
|
||||||
|
|
||||||
|
#if XASH_LOW_MEMORY == 0
|
||||||
|
#define MAX_LEGACY_RESOURCES 2048
|
||||||
|
#elif XASH_LOW_MEMORY == 2
|
||||||
|
#define MAX_LEGACY_RESOURCES 1
|
||||||
|
#elif XASH_LOW_MEMORY == 1
|
||||||
|
#define MAX_LEGACY_RESOURCES 512
|
||||||
|
#endif
|
||||||
|
/*
|
||||||
|
==============
|
||||||
|
CL_ParseResourceList
|
||||||
|
|
||||||
|
==============
|
||||||
|
*/
|
||||||
|
static void CL_LegacyParseResourceList( sizebuf_t *msg )
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
static struct
|
||||||
|
{
|
||||||
|
int rescount;
|
||||||
|
int restype[MAX_LEGACY_RESOURCES];
|
||||||
|
char resnames[MAX_LEGACY_RESOURCES][MAX_QPATH];
|
||||||
|
} reslist;
|
||||||
|
|
||||||
|
memset( &reslist, 0, sizeof( reslist ));
|
||||||
|
reslist.rescount = MSG_ReadWord( msg ) - 1;
|
||||||
|
|
||||||
|
if( reslist.rescount > MAX_LEGACY_RESOURCES )
|
||||||
|
Host_Error("MAX_RESOURCES reached\n");
|
||||||
|
|
||||||
|
for( i = 0; i < reslist.rescount; i++ )
|
||||||
|
{
|
||||||
|
reslist.restype[i] = MSG_ReadWord( msg );
|
||||||
|
Q_strncpy( reslist.resnames[i], MSG_ReadString( msg ), MAX_QPATH );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( CL_IsPlaybackDemo() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if( !cl_allow_download.value )
|
||||||
|
{
|
||||||
|
Con_DPrintf( "Refusing new resource, cl_allow_download set to 0\n" );
|
||||||
|
reslist.rescount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( cls.state == ca_active && !cl_download_ingame.value )
|
||||||
|
{
|
||||||
|
Con_DPrintf( "Refusing new resource, cl_download_ingame set to 0\n" );
|
||||||
|
reslist.rescount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
HTTP_ResetProcessState();
|
||||||
|
|
||||||
|
host.downloadcount = 0;
|
||||||
|
|
||||||
|
for( i = 0; i < reslist.rescount; i++ )
|
||||||
|
{
|
||||||
|
char soundpath[MAX_VA_STRING];
|
||||||
|
const char *path;
|
||||||
|
|
||||||
|
if( reslist.restype[i] == t_sound )
|
||||||
|
{
|
||||||
|
Q_snprintf( soundpath, sizeof( soundpath ), DEFAULT_SOUNDPATH "%s", reslist.resnames[i] );
|
||||||
|
|
||||||
|
path = soundpath;
|
||||||
|
}
|
||||||
|
else path = reslist.resnames[i];
|
||||||
|
|
||||||
|
if( FS_FileExists( path, false ))
|
||||||
|
continue; // already exists
|
||||||
|
|
||||||
|
host.downloadcount++;
|
||||||
|
HTTP_AddDownload( path, -1, true );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !host.downloadcount )
|
||||||
|
{
|
||||||
|
MSG_WriteByte( &cls.netchan.message, clc_stringcmd );
|
||||||
|
MSG_WriteString( &cls.netchan.message, "continueloading" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
=====================
|
||||||
|
CL_ParseLegacyServerMessage
|
||||||
|
|
||||||
|
dispatch messages
|
||||||
|
=====================
|
||||||
|
*/
|
||||||
|
void CL_ParseLegacyServerMessage( sizebuf_t *msg, qboolean normal_message )
|
||||||
|
{
|
||||||
|
size_t bufStart, playerbytes;
|
||||||
|
int cmd, param1, param2;
|
||||||
|
int old_background;
|
||||||
|
const char *s;
|
||||||
|
|
||||||
|
cls.starting_count = MSG_GetNumBytesRead( msg ); // updates each frame
|
||||||
|
CL_Parse_Debug( true ); // begin parsing
|
||||||
|
|
||||||
|
if( normal_message )
|
||||||
|
{
|
||||||
|
// assume no entity/player update this packet
|
||||||
|
if( cls.state == ca_active )
|
||||||
|
{
|
||||||
|
cl.frames[cls.netchan.incoming_sequence & CL_UPDATE_MASK].valid = false;
|
||||||
|
cl.frames[cls.netchan.incoming_sequence & CL_UPDATE_MASK].choked = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CL_ResetFrame( &cl.frames[cls.netchan.incoming_sequence & CL_UPDATE_MASK] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// parse the message
|
||||||
|
while( 1 )
|
||||||
|
{
|
||||||
|
if( MSG_CheckOverflow( msg ))
|
||||||
|
{
|
||||||
|
Host_Error( "CL_ParseServerMessage: overflow!\n" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// mark start position
|
||||||
|
bufStart = MSG_GetNumBytesRead( msg );
|
||||||
|
|
||||||
|
// end of message (align bits)
|
||||||
|
if( MSG_GetNumBitsLeft( msg ) < 8 )
|
||||||
|
break;
|
||||||
|
|
||||||
|
cmd = MSG_ReadServerCmd( msg );
|
||||||
|
|
||||||
|
// record command for debugging spew on parse problem
|
||||||
|
CL_Parse_RecordCommand( cmd, bufStart );
|
||||||
|
|
||||||
|
// other commands
|
||||||
|
switch( cmd )
|
||||||
|
{
|
||||||
|
case svc_bad:
|
||||||
|
Host_Error( "svc_bad\n" );
|
||||||
|
break;
|
||||||
|
case svc_nop:
|
||||||
|
// this does nothing
|
||||||
|
break;
|
||||||
|
case svc_disconnect:
|
||||||
|
CL_Drop ();
|
||||||
|
Host_AbortCurrentFrame ();
|
||||||
|
break;
|
||||||
|
case svc_legacy_event:
|
||||||
|
CL_ParseEvent( msg );
|
||||||
|
cl.frames[cl.parsecountmod].graphdata.event += MSG_GetNumBytesRead( msg ) - bufStart;
|
||||||
|
break;
|
||||||
|
case svc_legacy_changing:
|
||||||
|
old_background = cl.background;
|
||||||
|
if( MSG_ReadOneBit( msg ))
|
||||||
|
{
|
||||||
|
int maxclients = cl.maxclients;
|
||||||
|
|
||||||
|
cls.changelevel = true;
|
||||||
|
S_StopAllSounds( true );
|
||||||
|
|
||||||
|
Con_Printf( "Server changing, reconnecting\n" );
|
||||||
|
|
||||||
|
if( cls.demoplayback )
|
||||||
|
{
|
||||||
|
SCR_BeginLoadingPlaque( cl.background );
|
||||||
|
cls.changedemo = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
CL_ClearState( );
|
||||||
|
|
||||||
|
// a1ba: need to restore cl.maxclients because engine chooses
|
||||||
|
// frame backups count depending on this value
|
||||||
|
// In general, it's incorrect to call CL_InitEdicts right after
|
||||||
|
// CL_ClearState because of this bug. Some time later this logic
|
||||||
|
// should be re-done.
|
||||||
|
CL_InitEdicts( maxclients ); // re-arrange edicts
|
||||||
|
}
|
||||||
|
else Con_Printf( "Server disconnected, reconnecting\n" );
|
||||||
|
|
||||||
|
if( cls.demoplayback )
|
||||||
|
{
|
||||||
|
cl.background = (cls.demonum != -1) ? true : false;
|
||||||
|
cls.state = ca_connected;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// g-cont. local client skip the challenge
|
||||||
|
if( SV_Active( ))
|
||||||
|
cls.state = ca_disconnected;
|
||||||
|
else cls.state = ca_connecting;
|
||||||
|
cl.background = old_background;
|
||||||
|
cls.connect_time = MAX_HEARTBEAT;
|
||||||
|
cls.connect_retry = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case svc_setview:
|
||||||
|
CL_ParseViewEntity( msg );
|
||||||
|
break;
|
||||||
|
case svc_sound:
|
||||||
|
CL_LegacyParseSoundPacket( msg, false );
|
||||||
|
cl.frames[cl.parsecountmod].graphdata.sound += MSG_GetNumBytesRead( msg ) - bufStart;
|
||||||
|
break;
|
||||||
|
case svc_legacy_ambientsound:
|
||||||
|
CL_LegacyParseSoundPacket( msg, true );
|
||||||
|
cl.frames[cl.parsecountmod].graphdata.sound += MSG_GetNumBytesRead( msg ) - bufStart;
|
||||||
|
|
||||||
|
break;
|
||||||
|
case svc_time:
|
||||||
|
CL_ParseServerTime( msg );
|
||||||
|
break;
|
||||||
|
case svc_print:
|
||||||
|
Con_Printf( "%s", MSG_ReadString( msg ));
|
||||||
|
break;
|
||||||
|
case svc_stufftext:
|
||||||
|
s = MSG_ReadString( msg );
|
||||||
|
if( cl_trace_stufftext.value )
|
||||||
|
{
|
||||||
|
size_t len = Q_strlen( s );
|
||||||
|
Con_Printf( "Stufftext: %s%c", s, len && s[len-1] == '\n' ? '\0' : '\n' );
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef HACKS_RELATED_HLMODS
|
||||||
|
// disable Cry Of Fear antisave protection
|
||||||
|
if( !Q_strnicmp( s, "disconnect", 10 ) && cls.signon != SIGNONS )
|
||||||
|
break; // too early
|
||||||
|
#endif
|
||||||
|
Cbuf_AddFilteredText( s );
|
||||||
|
break;
|
||||||
|
case svc_setangle:
|
||||||
|
CL_ParseSetAngle( msg );
|
||||||
|
break;
|
||||||
|
case svc_serverdata:
|
||||||
|
Cbuf_Execute(); // make sure any stuffed commands are done
|
||||||
|
CL_ParseServerData( msg, true );
|
||||||
|
break;
|
||||||
|
case svc_lightstyle:
|
||||||
|
CL_ParseLightStyle( msg );
|
||||||
|
break;
|
||||||
|
case svc_updateuserinfo:
|
||||||
|
CL_UpdateUserinfo( msg, true );
|
||||||
|
break;
|
||||||
|
case svc_deltatable:
|
||||||
|
Delta_ParseTableField( msg );
|
||||||
|
break;
|
||||||
|
case svc_clientdata:
|
||||||
|
CL_ParseClientData( msg );
|
||||||
|
cl.frames[cl.parsecountmod].graphdata.client += MSG_GetNumBytesRead( msg ) - bufStart;
|
||||||
|
break;
|
||||||
|
case svc_resource:
|
||||||
|
CL_ParseResource( msg );
|
||||||
|
break;
|
||||||
|
case svc_pings:
|
||||||
|
CL_UpdateUserPings( msg );
|
||||||
|
break;
|
||||||
|
case svc_particle:
|
||||||
|
CL_ParseParticles( msg );
|
||||||
|
break;
|
||||||
|
case svc_restoresound:
|
||||||
|
CL_ParseRestoreSoundPacket( msg );
|
||||||
|
cl.frames[cl.parsecountmod].graphdata.sound += MSG_GetNumBytesRead( msg ) - bufStart;
|
||||||
|
break;
|
||||||
|
case svc_spawnstatic:
|
||||||
|
CL_LegacyParseStaticEntity( msg );
|
||||||
|
break;
|
||||||
|
case svc_event_reliable:
|
||||||
|
CL_ParseReliableEvent( msg );
|
||||||
|
cl.frames[cl.parsecountmod].graphdata.event += MSG_GetNumBytesRead( msg ) - bufStart;
|
||||||
|
break;
|
||||||
|
case svc_spawnbaseline:
|
||||||
|
CL_ParseBaseline( msg, true );
|
||||||
|
break;
|
||||||
|
case svc_temp_entity:
|
||||||
|
CL_ParseTempEntity( msg );
|
||||||
|
cl.frames[cl.parsecountmod].graphdata.tentities += MSG_GetNumBytesRead( msg ) - bufStart;
|
||||||
|
break;
|
||||||
|
case svc_setpause:
|
||||||
|
cl.paused = ( MSG_ReadOneBit( msg ) != 0 );
|
||||||
|
break;
|
||||||
|
case svc_signonnum:
|
||||||
|
CL_ParseSignon( msg );
|
||||||
|
break;
|
||||||
|
case svc_centerprint:
|
||||||
|
CL_CenterPrint( MSG_ReadString( msg ), 0.25f );
|
||||||
|
break;
|
||||||
|
case svc_intermission:
|
||||||
|
cl.intermission = 1;
|
||||||
|
break;
|
||||||
|
case svc_legacy_modelindex:
|
||||||
|
CL_LegacyPrecacheModel( msg );
|
||||||
|
break;
|
||||||
|
case svc_legacy_soundindex:
|
||||||
|
CL_LegacyPrecacheSound( msg );
|
||||||
|
break;
|
||||||
|
case svc_cdtrack:
|
||||||
|
param1 = MSG_ReadByte( msg );
|
||||||
|
param1 = bound( 1, param1, MAX_CDTRACKS ); // tracknum
|
||||||
|
param2 = MSG_ReadByte( msg );
|
||||||
|
param2 = bound( 1, param2, MAX_CDTRACKS ); // loopnum
|
||||||
|
S_StartBackgroundTrack( clgame.cdtracks[param1-1], clgame.cdtracks[param2-1], 0, false );
|
||||||
|
break;
|
||||||
|
case svc_restore:
|
||||||
|
CL_ParseRestore( msg );
|
||||||
|
break;
|
||||||
|
case svc_legacy_eventindex:
|
||||||
|
CL_LegacyPrecacheEvent(msg);
|
||||||
|
break;
|
||||||
|
case svc_weaponanim:
|
||||||
|
param1 = MSG_ReadByte( msg ); // iAnim
|
||||||
|
param2 = MSG_ReadByte( msg ); // body
|
||||||
|
CL_WeaponAnim( param1, param2 );
|
||||||
|
break;
|
||||||
|
case svc_bspdecal:
|
||||||
|
CL_ParseStaticDecal( msg );
|
||||||
|
break;
|
||||||
|
case svc_roomtype:
|
||||||
|
param1 = MSG_ReadShort( msg );
|
||||||
|
Cvar_SetValue( "room_type", param1 );
|
||||||
|
break;
|
||||||
|
case svc_addangle:
|
||||||
|
CL_ParseAddAngle( msg );
|
||||||
|
break;
|
||||||
|
case svc_usermessage:
|
||||||
|
CL_RegisterUserMessage( msg );
|
||||||
|
break;
|
||||||
|
case svc_packetentities:
|
||||||
|
playerbytes = CL_ParsePacketEntities( msg, false );
|
||||||
|
cl.frames[cl.parsecountmod].graphdata.players += playerbytes;
|
||||||
|
cl.frames[cl.parsecountmod].graphdata.entities += MSG_GetNumBytesRead( msg ) - bufStart - playerbytes;
|
||||||
|
break;
|
||||||
|
case svc_deltapacketentities:
|
||||||
|
playerbytes = CL_ParsePacketEntities( msg, true );
|
||||||
|
cl.frames[cl.parsecountmod].graphdata.players += playerbytes;
|
||||||
|
cl.frames[cl.parsecountmod].graphdata.entities += MSG_GetNumBytesRead( msg ) - bufStart - playerbytes;
|
||||||
|
break;
|
||||||
|
case svc_legacy_chokecount:
|
||||||
|
{
|
||||||
|
int i, j;
|
||||||
|
i = MSG_ReadByte( msg );
|
||||||
|
j = cls.netchan.incoming_acknowledged - 1;
|
||||||
|
for( ; i > 0 && j > cls.netchan.outgoing_sequence - CL_UPDATE_BACKUP; j-- )
|
||||||
|
{
|
||||||
|
if( cl.frames[j & CL_UPDATE_MASK].receivedtime != -3.0 )
|
||||||
|
{
|
||||||
|
cl.frames[j & CL_UPDATE_MASK].choked = true;
|
||||||
|
cl.frames[j & CL_UPDATE_MASK].receivedtime = -2.0;
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//cl.frames[cls.netchan.incoming_sequence & CL_UPDATE_MASK].choked = true;
|
||||||
|
//cl.frames[cls.netchan.incoming_sequence & CL_UPDATE_MASK].receivedtime = -2.0;
|
||||||
|
break;
|
||||||
|
case svc_resourcelist:
|
||||||
|
CL_LegacyParseResourceList( msg );
|
||||||
|
break;
|
||||||
|
case svc_deltamovevars:
|
||||||
|
CL_ParseMovevars( msg );
|
||||||
|
break;
|
||||||
|
case svc_resourcerequest:
|
||||||
|
CL_ParseResourceRequest( msg );
|
||||||
|
break;
|
||||||
|
case svc_customization:
|
||||||
|
CL_ParseCustomization( msg );
|
||||||
|
break;
|
||||||
|
case svc_crosshairangle:
|
||||||
|
CL_ParseCrosshairAngle( msg );
|
||||||
|
break;
|
||||||
|
case svc_soundfade:
|
||||||
|
CL_ParseSoundFade( msg );
|
||||||
|
break;
|
||||||
|
case svc_filetxferfailed:
|
||||||
|
CL_ParseFileTransferFailed( msg );
|
||||||
|
break;
|
||||||
|
case svc_hltv:
|
||||||
|
CL_ParseHLTV( msg );
|
||||||
|
break;
|
||||||
|
case svc_director:
|
||||||
|
CL_ParseDirector( msg );
|
||||||
|
break;
|
||||||
|
case svc_resourcelocation:
|
||||||
|
CL_ParseResLocation( msg );
|
||||||
|
break;
|
||||||
|
case svc_querycvarvalue:
|
||||||
|
CL_ParseCvarValue( msg, false );
|
||||||
|
break;
|
||||||
|
case svc_querycvarvalue2:
|
||||||
|
CL_ParseCvarValue( msg, true );
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
CL_ParseUserMessage( msg, cmd );
|
||||||
|
cl.frames[cl.parsecountmod].graphdata.usr += MSG_GetNumBytesRead( msg ) - bufStart;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cl.frames[cl.parsecountmod].graphdata.msgbytes += MSG_GetNumBytesRead( msg ) - cls.starting_count;
|
||||||
|
CL_Parse_Debug( false ); // done
|
||||||
|
|
||||||
|
// we don't know if it is ok to save a demo message until
|
||||||
|
// after we have parsed the frame
|
||||||
|
if( !cls.demoplayback )
|
||||||
|
{
|
||||||
|
if( cls.demorecording && !cls.demowaiting )
|
||||||
|
{
|
||||||
|
CL_WriteDemoMessage( false, cls.starting_count, msg );
|
||||||
|
}
|
||||||
|
else if( cls.state != ca_active )
|
||||||
|
{
|
||||||
|
CL_WriteDemoMessage( true, cls.starting_count, msg );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CL_LegacyPrecache_f( void )
|
||||||
|
{
|
||||||
|
int spawncount, i;
|
||||||
|
model_t *mod;
|
||||||
|
|
||||||
|
if( !cls.legacymode )
|
||||||
|
return;
|
||||||
|
|
||||||
|
spawncount = Q_atoi( Cmd_Argv( 1 ));
|
||||||
|
|
||||||
|
Con_Printf( "Setting up renderer...\n" );
|
||||||
|
|
||||||
|
// load tempent sprites (glowshell, muzzleflashes etc)
|
||||||
|
CL_LoadClientSprites ();
|
||||||
|
|
||||||
|
// invalidate all decal indexes
|
||||||
|
memset( cl.decal_index, 0, sizeof( cl.decal_index ));
|
||||||
|
cl.video_prepped = true;
|
||||||
|
cl.audio_prepped = true;
|
||||||
|
if( clgame.entities )
|
||||||
|
clgame.entities->model = cl.worldmodel;
|
||||||
|
|
||||||
|
// tell rendering system we have a new set of models.
|
||||||
|
ref.dllFuncs.R_NewMap ();
|
||||||
|
|
||||||
|
CL_SetupOverviewParams();
|
||||||
|
|
||||||
|
// release unused SpriteTextures
|
||||||
|
for( i = 1, mod = clgame.sprites; i < MAX_CLIENT_SPRITES; i++, mod++ )
|
||||||
|
{
|
||||||
|
if( mod->needload == NL_UNREFERENCED && COM_CheckString( mod->name ))
|
||||||
|
Mod_FreeModel( mod );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Mod_FreeUnused ();
|
||||||
|
|
||||||
|
if( host_developer.value <= DEV_NONE )
|
||||||
|
Con_ClearNotify(); // clear any lines of console text
|
||||||
|
|
||||||
|
// done with all resources, issue prespawn command.
|
||||||
|
// Include server count in case server disconnects and changes level during d/l
|
||||||
|
MSG_BeginClientCmd( &cls.netchan.message, clc_stringcmd );
|
||||||
|
MSG_WriteStringf( &cls.netchan.message, "begin %i", spawncount );
|
||||||
|
cls.signon = SIGNONS;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CL_LegacyUpdateInfo( void )
|
||||||
|
{
|
||||||
|
if( !cls.legacymode )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if( cls.state != ca_active )
|
||||||
|
return;
|
||||||
|
|
||||||
|
MSG_BeginClientCmd( &cls.netchan.message, clc_legacy_userinfo );
|
||||||
|
MSG_WriteString( &cls.netchan.message, cls.userinfo );
|
||||||
|
}
|
||||||
|
|
||||||
|
qboolean CL_LegacyMode( void )
|
||||||
|
{
|
||||||
|
return cls.legacymode;
|
||||||
|
}
|
||||||
@@ -26,27 +26,13 @@ GNU General Public License for more details.
|
|||||||
#define MIN_PREDICTION_EPSILON 0.5f // complain if error is > this and we have cl_showerror set
|
#define MIN_PREDICTION_EPSILON 0.5f // complain if error is > this and we have cl_showerror set
|
||||||
#define MAX_PREDICTION_ERROR 64.0f // above this is assumed to be a teleport, don't smooth, etc.
|
#define MAX_PREDICTION_ERROR 64.0f // above this is assumed to be a teleport, don't smooth, etc.
|
||||||
|
|
||||||
/*
|
|
||||||
=============
|
|
||||||
CL_ClearPhysEnts
|
|
||||||
|
|
||||||
=============
|
|
||||||
*/
|
|
||||||
void CL_ClearPhysEnts( void )
|
|
||||||
{
|
|
||||||
clgame.pmove->numtouch = 0;
|
|
||||||
clgame.pmove->numvisent = 0;
|
|
||||||
clgame.pmove->nummoveent = 0;
|
|
||||||
clgame.pmove->numphysent = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============
|
=============
|
||||||
CL_PushPMStates
|
CL_PushPMStates
|
||||||
|
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
void CL_PushPMStates( void )
|
void GAME_EXPORT CL_PushPMStates( void )
|
||||||
{
|
{
|
||||||
if( clgame.pushed ) return;
|
if( clgame.pushed ) return;
|
||||||
clgame.oldphyscount = clgame.pmove->numphysent;
|
clgame.oldphyscount = clgame.pmove->numphysent;
|
||||||
@@ -60,7 +46,7 @@ CL_PopPMStates
|
|||||||
|
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
void CL_PopPMStates( void )
|
void GAME_EXPORT CL_PopPMStates( void )
|
||||||
{
|
{
|
||||||
if( !clgame.pushed ) return;
|
if( !clgame.pushed ) return;
|
||||||
clgame.pmove->numphysent = clgame.oldphyscount;
|
clgame.pmove->numphysent = clgame.oldphyscount;
|
||||||
@@ -68,31 +54,6 @@ void CL_PopPMStates( void )
|
|||||||
clgame.pushed = false;
|
clgame.pushed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
=============
|
|
||||||
CL_PushTraceBounds
|
|
||||||
|
|
||||||
=============
|
|
||||||
*/
|
|
||||||
void CL_PushTraceBounds( int hullnum, const float *mins, const float *maxs )
|
|
||||||
{
|
|
||||||
hullnum = bound( 0, hullnum, 3 );
|
|
||||||
VectorCopy( mins, clgame.pmove->player_mins[hullnum] );
|
|
||||||
VectorCopy( maxs, clgame.pmove->player_maxs[hullnum] );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
=============
|
|
||||||
CL_PopTraceBounds
|
|
||||||
|
|
||||||
=============
|
|
||||||
*/
|
|
||||||
void CL_PopTraceBounds( void )
|
|
||||||
{
|
|
||||||
memcpy( clgame.pmove->player_mins, host.player_mins, sizeof( host.player_mins ));
|
|
||||||
memcpy( clgame.pmove->player_maxs, host.player_maxs, sizeof( host.player_maxs ));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===============
|
===============
|
||||||
CL_IsPredicted
|
CL_IsPredicted
|
||||||
@@ -100,7 +61,7 @@ CL_IsPredicted
|
|||||||
*/
|
*/
|
||||||
qboolean CL_IsPredicted( void )
|
qboolean CL_IsPredicted( void )
|
||||||
{
|
{
|
||||||
if( cl_nopred->value || cl.intermission )
|
if( cl_nopred.value || cl.intermission )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// never predict the quake demos
|
// never predict the quake demos
|
||||||
@@ -197,7 +158,7 @@ void CL_SetIdealPitch( void )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( steps < 2 ) return;
|
if( steps < 2 ) return;
|
||||||
cl.local.idealpitch = -dir * cl_idealpitchscale->value;
|
cl.local.idealpitch = -dir * cl_idealpitchscale.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -208,7 +169,7 @@ check for instant movement in case
|
|||||||
we don't want interpolate this
|
we don't want interpolate this
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
qboolean CL_PlayerTeleported( local_state_t *from, local_state_t *to )
|
static qboolean CL_PlayerTeleported( local_state_t *from, local_state_t *to )
|
||||||
{
|
{
|
||||||
int len, maxlen;
|
int len, maxlen;
|
||||||
vec3_t delta;
|
vec3_t delta;
|
||||||
@@ -216,7 +177,7 @@ qboolean CL_PlayerTeleported( local_state_t *from, local_state_t *to )
|
|||||||
VectorSubtract( to->playerstate.origin, from->playerstate.origin, delta );
|
VectorSubtract( to->playerstate.origin, from->playerstate.origin, delta );
|
||||||
|
|
||||||
// compute potential max movement in units per frame and compare with entity movement
|
// compute potential max movement in units per frame and compare with entity movement
|
||||||
maxlen = ( clgame.movevars.maxvelocity * ( 1.0 / GAME_FPS ));
|
maxlen = ( clgame.movevars.maxvelocity * ( 1.0f / GAME_FPS ));
|
||||||
len = VectorLength( delta );
|
len = VectorLength( delta );
|
||||||
|
|
||||||
return (len > maxlen);
|
return (len > maxlen);
|
||||||
@@ -248,7 +209,7 @@ void CL_CheckPredictionError( void )
|
|||||||
// save the prediction error for interpolation
|
// save the prediction error for interpolation
|
||||||
if( dist > MAX_PREDICTION_ERROR )
|
if( dist > MAX_PREDICTION_ERROR )
|
||||||
{
|
{
|
||||||
if( cl_showerror->value && host_developer.value )
|
if( cl_showerror.value && host_developer.value )
|
||||||
Con_NPrintf( 10 + ( ++pos & 3 ), "^3player teleported:^7 %.3f units\n", dist );
|
Con_NPrintf( 10 + ( ++pos & 3 ), "^3player teleported:^7 %.3f units\n", dist );
|
||||||
|
|
||||||
// a teleport or something or gamepaused
|
// a teleport or something or gamepaused
|
||||||
@@ -256,7 +217,7 @@ void CL_CheckPredictionError( void )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( cl_showerror->value && dist > MIN_PREDICTION_EPSILON && host_developer.value )
|
if( cl_showerror.value && dist > MIN_PREDICTION_EPSILON && host_developer.value )
|
||||||
Con_NPrintf( 10 + ( ++pos & 3 ), "^1prediction error:^7 %.3f units\n", dist );
|
Con_NPrintf( 10 + ( ++pos & 3 ), "^1prediction error:^7 %.3f units\n", dist );
|
||||||
|
|
||||||
VectorCopy( cl.frames[cmd].playerstate[cl.playernum].origin, cl.local.predicted_origins[frame] );
|
VectorCopy( cl.frames[cmd].playerstate[cl.playernum].origin, cl.local.predicted_origins[frame] );
|
||||||
@@ -264,8 +225,10 @@ void CL_CheckPredictionError( void )
|
|||||||
// save for error interpolation
|
// save for error interpolation
|
||||||
VectorCopy( delta, cl.local.prediction_error );
|
VectorCopy( delta, cl.local.prediction_error );
|
||||||
|
|
||||||
if( dist > MIN_CORRECTION_DISTANCE )
|
// GoldSrc checks for singleplayer
|
||||||
cls.correction_time = cl_smoothtime->value;
|
// we would check for local server
|
||||||
|
if( dist > MIN_CORRECTION_DISTANCE && !SV_Active() )
|
||||||
|
cls.correction_time = cl_smoothtime.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -280,7 +243,7 @@ then with clipping against them.
|
|||||||
This sets up the first phase.
|
This sets up the first phase.
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
void CL_SetUpPlayerPrediction( int dopred, int bIncludeLocalClient )
|
void GAME_EXPORT CL_SetUpPlayerPrediction( int dopred, int bIncludeLocalClient )
|
||||||
{
|
{
|
||||||
entity_state_t *state;
|
entity_state_t *state;
|
||||||
predicted_player_t *player;
|
predicted_player_t *player;
|
||||||
@@ -429,7 +392,7 @@ CL_AddLinksToPmove
|
|||||||
collect solid entities
|
collect solid entities
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
void CL_AddLinksToPmove( frame_t *frame )
|
static void CL_AddLinksToPmove( frame_t *frame )
|
||||||
{
|
{
|
||||||
entity_state_t *state;
|
entity_state_t *state;
|
||||||
model_t *model;
|
model_t *model;
|
||||||
@@ -538,14 +501,14 @@ pmove must be setup with world and solid entity hulls before calling
|
|||||||
(via CL_PredictMove)
|
(via CL_PredictMove)
|
||||||
===============
|
===============
|
||||||
*/
|
*/
|
||||||
void CL_SetSolidPlayers( int playernum )
|
void GAME_EXPORT CL_SetSolidPlayers( int playernum )
|
||||||
{
|
{
|
||||||
entity_state_t *state;
|
entity_state_t *state;
|
||||||
predicted_player_t *player;
|
predicted_player_t *player;
|
||||||
physent_t *pe;
|
physent_t *pe;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if( !cl_solid_players->value )
|
if( !cl_solid_players.value )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for( i = 0; i < MAX_CLIENTS; i++ )
|
for( i = 0; i < MAX_CLIENTS; i++ )
|
||||||
@@ -594,7 +557,7 @@ CL_WaterEntity
|
|||||||
|
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
int CL_WaterEntity( const float *rgflPos )
|
int GAME_EXPORT CL_WaterEntity( const float *rgflPos )
|
||||||
{
|
{
|
||||||
physent_t *pe;
|
physent_t *pe;
|
||||||
hull_t *hull;
|
hull_t *hull;
|
||||||
@@ -699,148 +662,37 @@ cl_entity_t *CL_GetWaterEntity( const float *rgflPos )
|
|||||||
return CL_GetEntityByIndex( entnum );
|
return CL_GetEntityByIndex( entnum );
|
||||||
}
|
}
|
||||||
|
|
||||||
int CL_TestLine( const vec3_t start, const vec3_t end, int flags )
|
static int GAME_EXPORT pfnTestPlayerPosition( float *pos, pmtrace_t *ptrace )
|
||||||
{
|
|
||||||
return PM_TestLineExt( clgame.pmove, clgame.pmove->physents, clgame.pmove->numphysent, start, end, flags );
|
|
||||||
}
|
|
||||||
|
|
||||||
static int pfnTestPlayerPosition( float *pos, pmtrace_t *ptrace )
|
|
||||||
{
|
{
|
||||||
return PM_TestPlayerPosition( clgame.pmove, pos, ptrace, NULL );
|
return PM_TestPlayerPosition( clgame.pmove, pos, ptrace, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pfnStuckTouch( int hitent, pmtrace_t *tr )
|
static void GAME_EXPORT pfnStuckTouch( int hitent, pmtrace_t *tr )
|
||||||
{
|
{
|
||||||
int i;
|
PM_StuckTouch( clgame.pmove, hitent, tr );
|
||||||
|
|
||||||
for( i = 0; i < clgame.pmove->numtouch; i++ )
|
|
||||||
{
|
|
||||||
if( clgame.pmove->touchindex[i].ent == hitent )
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( clgame.pmove->numtouch >= MAX_PHYSENTS )
|
|
||||||
return;
|
|
||||||
|
|
||||||
VectorCopy( clgame.pmove->velocity, tr->deltavelocity );
|
|
||||||
tr->ent = hitent;
|
|
||||||
|
|
||||||
clgame.pmove->touchindex[clgame.pmove->numtouch++] = *tr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pfnPointContents( float *p, int *truecontents )
|
static int GAME_EXPORT pfnTruePointContents( float *p )
|
||||||
{
|
|
||||||
int cont, truecont;
|
|
||||||
|
|
||||||
truecont = cont = PM_PointContents( clgame.pmove, p );
|
|
||||||
if( truecontents ) *truecontents = truecont;
|
|
||||||
|
|
||||||
if( cont <= CONTENTS_CURRENT_0 && cont >= CONTENTS_CURRENT_DOWN )
|
|
||||||
cont = CONTENTS_WATER;
|
|
||||||
return cont;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int pfnTruePointContents( float *p )
|
|
||||||
{
|
{
|
||||||
return PM_TruePointContents( clgame.pmove, p );
|
return PM_TruePointContents( clgame.pmove, p );
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pfnHullPointContents( struct hull_s *hull, int num, float *p )
|
static pmtrace_t GAME_EXPORT pfnPlayerTrace( float *start, float *end, int traceFlags, int ignore_pe )
|
||||||
{
|
|
||||||
return PM_HullPointContents( hull, num, p );
|
|
||||||
}
|
|
||||||
|
|
||||||
static pmtrace_t pfnPlayerTrace( float *start, float *end, int traceFlags, int ignore_pe )
|
|
||||||
{
|
{
|
||||||
return PM_PlayerTraceExt( clgame.pmove, start, end, traceFlags, clgame.pmove->numphysent, clgame.pmove->physents, ignore_pe, NULL );
|
return PM_PlayerTraceExt( clgame.pmove, start, end, traceFlags, clgame.pmove->numphysent, clgame.pmove->physents, ignore_pe, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
static pmtrace_t *pfnTraceLine( float *start, float *end, int flags, int usehull, int ignore_pe )
|
static void *pfnHullForBsp( physent_t *pe, float *offset )
|
||||||
{
|
|
||||||
static pmtrace_t tr;
|
|
||||||
int old_usehull;
|
|
||||||
|
|
||||||
old_usehull = clgame.pmove->usehull;
|
|
||||||
clgame.pmove->usehull = usehull;
|
|
||||||
|
|
||||||
switch( flags )
|
|
||||||
{
|
|
||||||
case PM_TRACELINE_PHYSENTSONLY:
|
|
||||||
tr = PM_PlayerTraceExt( clgame.pmove, start, end, 0, clgame.pmove->numphysent, clgame.pmove->physents, ignore_pe, NULL );
|
|
||||||
break;
|
|
||||||
case PM_TRACELINE_ANYVISIBLE:
|
|
||||||
tr = PM_PlayerTraceExt( clgame.pmove, start, end, 0, clgame.pmove->numvisent, clgame.pmove->visents, ignore_pe, NULL );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
clgame.pmove->usehull = old_usehull;
|
|
||||||
|
|
||||||
return &tr;
|
|
||||||
}
|
|
||||||
|
|
||||||
static hull_t *pfnHullForBsp( physent_t *pe, float *offset )
|
|
||||||
{
|
{
|
||||||
return PM_HullForBsp( pe, clgame.pmove, offset );
|
return PM_HullForBsp( pe, clgame.pmove, offset );
|
||||||
}
|
}
|
||||||
|
|
||||||
static float pfnTraceModel( physent_t *pe, float *start, float *end, trace_t *trace )
|
static float GAME_EXPORT pfnTraceModel( physent_t *pe, float *start, float *end, trace_t *trace )
|
||||||
{
|
{
|
||||||
int old_usehull;
|
return PM_TraceModel( clgame.pmove, pe, start, end, trace );
|
||||||
vec3_t start_l, end_l;
|
|
||||||
vec3_t offset, temp;
|
|
||||||
qboolean rotated;
|
|
||||||
matrix4x4 matrix;
|
|
||||||
hull_t *hull;
|
|
||||||
|
|
||||||
old_usehull = clgame.pmove->usehull;
|
|
||||||
clgame.pmove->usehull = 2;
|
|
||||||
|
|
||||||
hull = PM_HullForBsp( pe, clgame.pmove, offset );
|
|
||||||
|
|
||||||
clgame.pmove->usehull = old_usehull;
|
|
||||||
|
|
||||||
if( pe->solid == SOLID_BSP && !VectorIsNull( pe->angles ))
|
|
||||||
rotated = true;
|
|
||||||
else rotated = false;
|
|
||||||
|
|
||||||
if( rotated )
|
|
||||||
{
|
|
||||||
Matrix4x4_CreateFromEntity( matrix, pe->angles, offset, 1.0f );
|
|
||||||
Matrix4x4_VectorITransform( matrix, start, start_l );
|
|
||||||
Matrix4x4_VectorITransform( matrix, end, end_l );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
VectorSubtract( start, offset, start_l );
|
|
||||||
VectorSubtract( end, offset, end_l );
|
|
||||||
}
|
|
||||||
|
|
||||||
PM_RecursiveHullCheck( hull, hull->firstclipnode, 0, 1, start_l, end_l, (pmtrace_t *)trace );
|
|
||||||
trace->ent = NULL;
|
|
||||||
|
|
||||||
if( rotated )
|
|
||||||
{
|
|
||||||
VectorCopy( trace->plane.normal, temp );
|
|
||||||
Matrix4x4_TransformPositivePlane( matrix, temp, trace->plane.dist, trace->plane.normal, &trace->plane.dist );
|
|
||||||
}
|
|
||||||
|
|
||||||
VectorLerp( start, trace->fraction, end, trace->endpos );
|
|
||||||
|
|
||||||
return trace->fraction;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *pfnTraceTexture( int ground, float *vstart, float *vend )
|
static void GAME_EXPORT pfnPlaySound( int channel, const char *sample, float volume, float attenuation, int fFlags, int pitch )
|
||||||
{
|
|
||||||
physent_t *pe;
|
|
||||||
|
|
||||||
if( ground < 0 || ground >= clgame.pmove->numphysent )
|
|
||||||
return NULL; // bad ground
|
|
||||||
|
|
||||||
pe = &clgame.pmove->physents[ground];
|
|
||||||
return PM_TraceTexture( pe, vstart, vend );
|
|
||||||
}
|
|
||||||
|
|
||||||
static void pfnPlaySound( int channel, const char *sample, float volume, float attenuation, int fFlags, int pitch )
|
|
||||||
{
|
{
|
||||||
if( !clgame.pmove->runfuncs )
|
if( !clgame.pmove->runfuncs )
|
||||||
return;
|
return;
|
||||||
@@ -848,54 +700,25 @@ static void pfnPlaySound( int channel, const char *sample, float volume, float a
|
|||||||
S_StartSound( NULL, clgame.pmove->player_index + 1, channel, S_RegisterSound( sample ), volume, attenuation, pitch, fFlags );
|
S_StartSound( NULL, clgame.pmove->player_index + 1, channel, S_RegisterSound( sample ), volume, attenuation, pitch, fFlags );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pfnPlaybackEventFull( int flags, int clientindex, word eventindex, float delay, float *origin,
|
static void GAME_EXPORT pfnPlaybackEventFull( int flags, int clientindex, word eventindex, float delay, float *origin,
|
||||||
float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 )
|
float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 )
|
||||||
{
|
{
|
||||||
CL_PlaybackEvent( flags, NULL, eventindex, delay, origin, angles, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2 );
|
CL_PlaybackEvent( flags, NULL, eventindex, delay, origin, angles, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
static pmtrace_t pfnPlayerTraceEx( float *start, float *end, int traceFlags, pfnIgnore pmFilter )
|
static pmtrace_t GAME_EXPORT pfnPlayerTraceEx( float *start, float *end, int traceFlags, pfnIgnore pmFilter )
|
||||||
{
|
{
|
||||||
return PM_PlayerTraceExt( clgame.pmove, start, end, traceFlags, clgame.pmove->numphysent, clgame.pmove->physents, -1, pmFilter );
|
return PM_PlayerTraceExt( clgame.pmove, start, end, traceFlags, clgame.pmove->numphysent, clgame.pmove->physents, -1, pmFilter );
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pfnTestPlayerPositionEx( float *pos, pmtrace_t *ptrace, pfnIgnore pmFilter )
|
static int GAME_EXPORT pfnTestPlayerPositionEx( float *pos, pmtrace_t *ptrace, pfnIgnore pmFilter )
|
||||||
{
|
{
|
||||||
return PM_TestPlayerPosition( clgame.pmove, pos, ptrace, pmFilter );
|
return PM_TestPlayerPosition( clgame.pmove, pos, ptrace, pmFilter );
|
||||||
}
|
}
|
||||||
|
|
||||||
static pmtrace_t *pfnTraceLineEx( float *start, float *end, int flags, int usehull, pfnIgnore pmFilter )
|
static pmtrace_t *pfnTraceLineEx( float *start, float *end, int flags, int usehull, pfnIgnore pmFilter )
|
||||||
{
|
{
|
||||||
static pmtrace_t tr;
|
return PM_TraceLineEx( clgame.pmove, start, end, flags, usehull, pmFilter );
|
||||||
int old_usehull;
|
|
||||||
|
|
||||||
old_usehull = clgame.pmove->usehull;
|
|
||||||
clgame.pmove->usehull = usehull;
|
|
||||||
|
|
||||||
switch( flags )
|
|
||||||
{
|
|
||||||
case PM_TRACELINE_PHYSENTSONLY:
|
|
||||||
tr = PM_PlayerTraceExt( clgame.pmove, start, end, 0, clgame.pmove->numphysent, clgame.pmove->physents, -1, pmFilter );
|
|
||||||
break;
|
|
||||||
case PM_TRACELINE_ANYVISIBLE:
|
|
||||||
tr = PM_PlayerTraceExt( clgame.pmove, start, end, 0, clgame.pmove->numvisent, clgame.pmove->visents, -1, pmFilter );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
clgame.pmove->usehull = old_usehull;
|
|
||||||
|
|
||||||
return &tr;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct msurface_s *pfnTraceSurface( int ground, float *vstart, float *vend )
|
|
||||||
{
|
|
||||||
physent_t *pe;
|
|
||||||
|
|
||||||
if( ground < 0 || ground >= clgame.pmove->numphysent )
|
|
||||||
return NULL; // bad ground
|
|
||||||
|
|
||||||
pe = &clgame.pmove->physents[ground];
|
|
||||||
return PM_TraceSurface( pe, vstart, vend );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -928,18 +751,18 @@ void CL_InitClientMove( void )
|
|||||||
|
|
||||||
// common utilities
|
// common utilities
|
||||||
clgame.pmove->PM_Info_ValueForKey = Info_ValueForKey;
|
clgame.pmove->PM_Info_ValueForKey = Info_ValueForKey;
|
||||||
clgame.pmove->PM_Particle = CL_Particle;
|
clgame.pmove->PM_Particle = CL_Particle; // ref should be initialized here already
|
||||||
clgame.pmove->PM_TestPlayerPosition = pfnTestPlayerPosition;
|
clgame.pmove->PM_TestPlayerPosition = pfnTestPlayerPosition;
|
||||||
clgame.pmove->Con_NPrintf = Con_NPrintf;
|
clgame.pmove->Con_NPrintf = Con_NPrintf;
|
||||||
clgame.pmove->Con_DPrintf = Con_DPrintf;
|
clgame.pmove->Con_DPrintf = Con_DPrintf;
|
||||||
clgame.pmove->Con_Printf = Con_Printf;
|
clgame.pmove->Con_Printf = Con_Printf;
|
||||||
clgame.pmove->Sys_FloatTime = Sys_DoubleTime;
|
clgame.pmove->Sys_FloatTime = Sys_DoubleTime;
|
||||||
clgame.pmove->PM_StuckTouch = pfnStuckTouch;
|
clgame.pmove->PM_StuckTouch = pfnStuckTouch;
|
||||||
clgame.pmove->PM_PointContents = pfnPointContents;
|
clgame.pmove->PM_PointContents = (void*)PM_CL_PointContents;
|
||||||
clgame.pmove->PM_TruePointContents = pfnTruePointContents;
|
clgame.pmove->PM_TruePointContents = pfnTruePointContents;
|
||||||
clgame.pmove->PM_HullPointContents = pfnHullPointContents;
|
clgame.pmove->PM_HullPointContents = (void*)PM_HullPointContents;
|
||||||
clgame.pmove->PM_PlayerTrace = pfnPlayerTrace;
|
clgame.pmove->PM_PlayerTrace = pfnPlayerTrace;
|
||||||
clgame.pmove->PM_TraceLine = pfnTraceLine;
|
clgame.pmove->PM_TraceLine = PM_CL_TraceLine;
|
||||||
clgame.pmove->RandomLong = COM_RandomLong;
|
clgame.pmove->RandomLong = COM_RandomLong;
|
||||||
clgame.pmove->RandomFloat = COM_RandomFloat;
|
clgame.pmove->RandomFloat = COM_RandomFloat;
|
||||||
clgame.pmove->PM_GetModelType = pfnGetModelType;
|
clgame.pmove->PM_GetModelType = pfnGetModelType;
|
||||||
@@ -951,7 +774,7 @@ void CL_InitClientMove( void )
|
|||||||
clgame.pmove->COM_FreeFile = COM_FreeFile;
|
clgame.pmove->COM_FreeFile = COM_FreeFile;
|
||||||
clgame.pmove->memfgets = COM_MemFgets;
|
clgame.pmove->memfgets = COM_MemFgets;
|
||||||
clgame.pmove->PM_PlaySound = pfnPlaySound;
|
clgame.pmove->PM_PlaySound = pfnPlaySound;
|
||||||
clgame.pmove->PM_TraceTexture = pfnTraceTexture;
|
clgame.pmove->PM_TraceTexture = PM_CL_TraceTexture;
|
||||||
clgame.pmove->PM_PlaybackEventFull = pfnPlaybackEventFull;
|
clgame.pmove->PM_PlaybackEventFull = pfnPlaybackEventFull;
|
||||||
clgame.pmove->PM_PlayerTraceEx = pfnPlayerTraceEx;
|
clgame.pmove->PM_PlayerTraceEx = pfnPlayerTraceEx;
|
||||||
clgame.pmove->PM_TestPlayerPositionEx = pfnTestPlayerPositionEx;
|
clgame.pmove->PM_TestPlayerPositionEx = pfnTestPlayerPositionEx;
|
||||||
@@ -962,26 +785,36 @@ void CL_InitClientMove( void )
|
|||||||
clgame.dllFuncs.pfnPlayerMoveInit( clgame.pmove );
|
clgame.dllFuncs.pfnPlayerMoveInit( clgame.pmove );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PM_CheckMovingGround( clientdata_t *cd, entity_state_t *state, float frametime )
|
static void CL_SetupPMove( playermove_t *pmove, const local_state_t *from, const usercmd_t *ucmd, qboolean runfuncs, double time )
|
||||||
{
|
{
|
||||||
if(!( cd->flags & FL_BASEVELOCITY ))
|
const entity_state_t *ps;
|
||||||
{
|
const clientdata_t *cd;
|
||||||
// apply momentum (add in half of the previous frame of velocity first)
|
|
||||||
VectorMA( cd->velocity, 1.0f + (frametime * 0.5f), state->basevelocity, cd->velocity );
|
|
||||||
VectorClear( state->basevelocity );
|
|
||||||
}
|
|
||||||
cd->flags &= ~FL_BASEVELOCITY;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CL_SetupPMove( playermove_t *pmove, local_state_t *from, usercmd_t *ucmd, qboolean runfuncs, double time )
|
|
||||||
{
|
|
||||||
entity_state_t *ps;
|
|
||||||
clientdata_t *cd;
|
|
||||||
|
|
||||||
ps = &from->playerstate;
|
ps = &from->playerstate;
|
||||||
cd = &from->client;
|
cd = &from->client;
|
||||||
|
|
||||||
pmove->player_index = ps->number - 1;
|
pmove->player_index = ps->number - 1;
|
||||||
|
|
||||||
|
// a1ba: workaround bug on old protocol where the server refuse to send
|
||||||
|
// our local player in delta. cl.playernum, in theory, must be equal
|
||||||
|
// to our local player index anyway
|
||||||
|
// this might not be a real solution, since everything else will be bogus
|
||||||
|
// but we need to properly run prediction and avoid potential memory
|
||||||
|
// corruption
|
||||||
|
// either debug this, or remove when old protocol will be dropped!!!
|
||||||
|
if( pmove->player_index < 0 )
|
||||||
|
{
|
||||||
|
if( cls.legacymode )
|
||||||
|
{
|
||||||
|
pmove->player_index = bound( 0, cl.playernum, cl.maxclients - 1 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// if this happens, record a demo and send it to a1ba
|
||||||
|
Host_Error( "%s: ps->number == %d\n", __func__, ps->number );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pmove->multiplayer = (cl.maxclients > 1);
|
pmove->multiplayer = (cl.maxclients > 1);
|
||||||
pmove->runfuncs = runfuncs;
|
pmove->runfuncs = runfuncs;
|
||||||
pmove->time = time * 1000.0f;
|
pmove->time = time * 1000.0f;
|
||||||
@@ -993,22 +826,21 @@ void CL_SetupPMove( playermove_t *pmove, local_state_t *from, usercmd_t *ucmd, q
|
|||||||
VectorCopy( ps->basevelocity, pmove->basevelocity );
|
VectorCopy( ps->basevelocity, pmove->basevelocity );
|
||||||
VectorCopy( cd->view_ofs, pmove->view_ofs );
|
VectorCopy( cd->view_ofs, pmove->view_ofs );
|
||||||
VectorClear( pmove->movedir );
|
VectorClear( pmove->movedir );
|
||||||
pmove->flDuckTime = cd->flDuckTime;
|
pmove->flDuckTime = (float)cd->flDuckTime;
|
||||||
pmove->bInDuck = cd->bInDuck;
|
pmove->bInDuck = cd->bInDuck;
|
||||||
pmove->usehull = ps->usehull;
|
pmove->usehull = ps->usehull;
|
||||||
pmove->flTimeStepSound = cd->flTimeStepSound;
|
pmove->flTimeStepSound = cd->flTimeStepSound;
|
||||||
pmove->iStepLeft = ps->iStepLeft;
|
pmove->iStepLeft = ps->iStepLeft;
|
||||||
pmove->flFallVelocity = ps->flFallVelocity;
|
pmove->flFallVelocity = ps->flFallVelocity;
|
||||||
pmove->flSwimTime = cd->flSwimTime;
|
pmove->flSwimTime = (float)cd->flSwimTime;
|
||||||
VectorCopy( cd->punchangle, pmove->punchangle );
|
VectorCopy( cd->punchangle, pmove->punchangle );
|
||||||
pmove->flSwimTime = cd->flSwimTime;
|
|
||||||
pmove->flNextPrimaryAttack = 0.0f; // not used by PM_ code
|
pmove->flNextPrimaryAttack = 0.0f; // not used by PM_ code
|
||||||
pmove->effects = ps->effects;
|
pmove->effects = ps->effects;
|
||||||
pmove->flags = cd->flags;
|
pmove->flags = cd->flags;
|
||||||
pmove->gravity = ps->gravity;
|
pmove->gravity = ps->gravity;
|
||||||
pmove->friction = ps->friction;
|
pmove->friction = ps->friction;
|
||||||
pmove->oldbuttons = ps->oldbuttons;
|
pmove->oldbuttons = ps->oldbuttons;
|
||||||
pmove->waterjumptime = cd->waterjumptime;
|
pmove->waterjumptime = (float)cd->waterjumptime;
|
||||||
pmove->dead = (cl.local.health <= 0);
|
pmove->dead = (cl.local.health <= 0);
|
||||||
pmove->deadflag = cd->deadflag;
|
pmove->deadflag = cd->deadflag;
|
||||||
pmove->spectator = (cls.spectator != 0);
|
pmove->spectator = (cls.spectator != 0);
|
||||||
@@ -1035,7 +867,7 @@ void CL_SetupPMove( playermove_t *pmove, local_state_t *from, usercmd_t *ucmd, q
|
|||||||
Q_strncpy( pmove->physinfo, cls.physinfo, MAX_INFO_STRING );
|
Q_strncpy( pmove->physinfo, cls.physinfo, MAX_INFO_STRING );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CL_FinishPMove( playermove_t *pmove, local_state_t *to )
|
static const void CL_FinishPMove( const playermove_t *pmove, local_state_t *to )
|
||||||
{
|
{
|
||||||
entity_state_t *ps;
|
entity_state_t *ps;
|
||||||
clientdata_t *cd;
|
clientdata_t *cd;
|
||||||
@@ -1046,7 +878,7 @@ void CL_FinishPMove( playermove_t *pmove, local_state_t *to )
|
|||||||
cd->flags = pmove->flags;
|
cd->flags = pmove->flags;
|
||||||
cd->bInDuck = pmove->bInDuck;
|
cd->bInDuck = pmove->bInDuck;
|
||||||
cd->flTimeStepSound = pmove->flTimeStepSound;
|
cd->flTimeStepSound = pmove->flTimeStepSound;
|
||||||
cd->flDuckTime = pmove->flDuckTime;
|
cd->flDuckTime = (int)pmove->flDuckTime;
|
||||||
cd->flSwimTime = (int)pmove->flSwimTime;
|
cd->flSwimTime = (int)pmove->flSwimTime;
|
||||||
cd->waterjumptime = (int)pmove->waterjumptime;
|
cd->waterjumptime = (int)pmove->waterjumptime;
|
||||||
cd->watertype = pmove->watertype;
|
cd->watertype = pmove->watertype;
|
||||||
@@ -1059,7 +891,7 @@ void CL_FinishPMove( playermove_t *pmove, local_state_t *to )
|
|||||||
VectorCopy( pmove->angles, ps->angles );
|
VectorCopy( pmove->angles, ps->angles );
|
||||||
VectorCopy( pmove->basevelocity, ps->basevelocity );
|
VectorCopy( pmove->basevelocity, ps->basevelocity );
|
||||||
VectorCopy( pmove->punchangle, cd->punchangle );
|
VectorCopy( pmove->punchangle, cd->punchangle );
|
||||||
ps->oldbuttons = pmove->oldbuttons;
|
ps->oldbuttons = (uint)pmove->cmd.buttons;
|
||||||
ps->friction = pmove->friction;
|
ps->friction = pmove->friction;
|
||||||
ps->movetype = pmove->movetype;
|
ps->movetype = pmove->movetype;
|
||||||
ps->onground = pmove->onground;
|
ps->onground = pmove->onground;
|
||||||
@@ -1088,16 +920,17 @@ CL_RunUsercmd
|
|||||||
Runs prediction code for user cmd
|
Runs prediction code for user cmd
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void CL_RunUsercmd( local_state_t *from, local_state_t *to, usercmd_t *u, qboolean runfuncs, double *time, unsigned int random_seed )
|
static void CL_RunUsercmd( local_state_t *from, local_state_t *to, usercmd_t *u, qboolean runfuncs, double *time, unsigned int random_seed )
|
||||||
{
|
{
|
||||||
usercmd_t cmd;
|
usercmd_t cmd;
|
||||||
local_state_t temp;
|
|
||||||
usercmd_t split;
|
|
||||||
|
|
||||||
memset( &temp, 0, sizeof( temp ));
|
|
||||||
|
|
||||||
if( u->msec > 50 )
|
if( u->msec > 50 )
|
||||||
{
|
{
|
||||||
|
local_state_t temp;
|
||||||
|
usercmd_t split;
|
||||||
|
|
||||||
|
memset( &temp, 0, sizeof( temp ));
|
||||||
|
|
||||||
split = *u;
|
split = *u;
|
||||||
split.msec /= 2;
|
split.msec /= 2;
|
||||||
CL_RunUsercmd( from, &temp, &split, runfuncs, time, random_seed );
|
CL_RunUsercmd( from, &temp, &split, runfuncs, time, random_seed );
|
||||||
@@ -1164,15 +997,11 @@ Sets cl.predicted.origin and cl.predicted.angles
|
|||||||
*/
|
*/
|
||||||
void CL_PredictMovement( qboolean repredicting )
|
void CL_PredictMovement( qboolean repredicting )
|
||||||
{
|
{
|
||||||
runcmd_t *to_cmd, *from_cmd;
|
runcmd_t *to_cmd = NULL, *from_cmd;
|
||||||
local_state_t *from = NULL, *to = NULL;
|
local_state_t *from = NULL, *to = NULL;
|
||||||
int current_command;
|
frame_t *frame = NULL;
|
||||||
int current_command_mod;
|
uint i, stoppoint;
|
||||||
frame_t *frame = NULL;
|
|
||||||
int i, stoppoint;
|
|
||||||
qboolean runfuncs;
|
|
||||||
double f = 1.0;
|
double f = 1.0;
|
||||||
cl_entity_t *ent;
|
|
||||||
double time;
|
double time;
|
||||||
|
|
||||||
if( cls.state != ca_active || cls.spectator )
|
if( cls.state != ca_active || cls.spectator )
|
||||||
@@ -1183,7 +1012,7 @@ void CL_PredictMovement( qboolean repredicting )
|
|||||||
|
|
||||||
CL_SetUpPlayerPrediction( false, false );
|
CL_SetUpPlayerPrediction( false, false );
|
||||||
|
|
||||||
if( cls.state != ca_active || !cl.validsequence )
|
if( !cl.validsequence )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(( cls.netchan.outgoing_sequence - cls.netchan.incoming_acknowledged ) >= CL_UPDATE_MASK )
|
if(( cls.netchan.outgoing_sequence - cls.netchan.incoming_acknowledged ) >= CL_UPDATE_MASK )
|
||||||
@@ -1224,6 +1053,10 @@ void CL_PredictMovement( qboolean repredicting )
|
|||||||
|
|
||||||
for( i = 1; i < CL_UPDATE_MASK && cls.netchan.incoming_acknowledged + i < cls.netchan.outgoing_sequence + stoppoint; i++ )
|
for( i = 1; i < CL_UPDATE_MASK && cls.netchan.incoming_acknowledged + i < cls.netchan.outgoing_sequence + stoppoint; i++ )
|
||||||
{
|
{
|
||||||
|
uint current_command;
|
||||||
|
uint current_command_mod;
|
||||||
|
qboolean runfuncs;
|
||||||
|
|
||||||
current_command = cls.netchan.incoming_acknowledged + i;
|
current_command = cls.netchan.incoming_acknowledged + i;
|
||||||
current_command_mod = current_command & CL_UPDATE_MASK;
|
current_command_mod = current_command & CL_UPDATE_MASK;
|
||||||
|
|
||||||
@@ -1238,10 +1071,6 @@ void CL_PredictMovement( qboolean repredicting )
|
|||||||
if( to_cmd->senttime >= host.realtime )
|
if( to_cmd->senttime >= host.realtime )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// now interpolate some fraction of the final frame
|
|
||||||
if( to_cmd->senttime != from_cmd->senttime )
|
|
||||||
f = (host.realtime - from_cmd->senttime) / (to_cmd->senttime - from_cmd->senttime) * 0.1;
|
|
||||||
|
|
||||||
from = to;
|
from = to;
|
||||||
from_cmd = to_cmd;
|
from_cmd = to_cmd;
|
||||||
}
|
}
|
||||||
@@ -1267,15 +1096,17 @@ void CL_PredictMovement( qboolean repredicting )
|
|||||||
cl.local.onground = frame->playerstate[cl.playernum].onground;
|
cl.local.onground = frame->playerstate[cl.playernum].onground;
|
||||||
else cl.local.onground = -1;
|
else cl.local.onground = -1;
|
||||||
|
|
||||||
if( !repredicting || !CVAR_TO_BOOL( cl_lw ))
|
if( !repredicting || !cl_lw.value )
|
||||||
cl.local.viewmodel = to->client.viewmodel;
|
cl.local.viewmodel = to->client.viewmodel;
|
||||||
cl.local.repredicting = false;
|
cl.local.repredicting = false;
|
||||||
cl.local.moving = false;
|
cl.local.moving = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
f = bound( 0.0f, f, 1.0f );
|
// now interpolate some fraction of the final frame
|
||||||
f = 0.0; // FIXME: make work, do revision
|
if( to_cmd->senttime != from_cmd->senttime )
|
||||||
|
f = bound( 0.0, (host.realtime - from_cmd->senttime) / (to_cmd->senttime - from_cmd->senttime) * 0.1, 1.0 );
|
||||||
|
else f = 0.0;
|
||||||
|
|
||||||
if( CL_PlayerTeleported( from, to ))
|
if( CL_PlayerTeleported( from, to ))
|
||||||
{
|
{
|
||||||
@@ -1297,12 +1128,12 @@ void CL_PredictMovement( qboolean repredicting )
|
|||||||
|
|
||||||
cl.local.waterlevel = to->client.waterlevel;
|
cl.local.waterlevel = to->client.waterlevel;
|
||||||
cl.local.usehull = to->playerstate.usehull;
|
cl.local.usehull = to->playerstate.usehull;
|
||||||
if( !repredicting || !CVAR_TO_BOOL( cl_lw ))
|
if( !repredicting || !cl_lw.value )
|
||||||
cl.local.viewmodel = to->client.viewmodel;
|
cl.local.viewmodel = to->client.viewmodel;
|
||||||
|
|
||||||
if( FBitSet( to->client.flags, FL_ONGROUND ))
|
if( FBitSet( to->client.flags, FL_ONGROUND ))
|
||||||
{
|
{
|
||||||
ent = CL_GetEntityByIndex( cl.local.lastground );
|
cl_entity_t *ent = CL_GetEntityByIndex( cl.local.lastground );
|
||||||
cl.local.onground = cl.local.lastground;
|
cl.local.onground = cl.local.lastground;
|
||||||
cl.local.moving = false;
|
cl.local.moving = false;
|
||||||
|
|
||||||
@@ -1324,27 +1155,27 @@ void CL_PredictMovement( qboolean repredicting )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
cl.local.onground = -1;
|
cl.local.onground = -1;
|
||||||
cl.local.moving = 0;
|
cl.local.moving = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( cls.correction_time > 0 && !cl_nosmooth->value && cl_smoothtime->value )
|
if( cls.correction_time > 0 && !cl_nosmooth.value && cl_smoothtime.value )
|
||||||
{
|
{
|
||||||
vec3_t delta;
|
vec3_t delta;
|
||||||
float frac;
|
float frac;
|
||||||
|
|
||||||
// only decay timer once per frame
|
// only decay timer once per frame
|
||||||
if( !repredicting )
|
if( !repredicting )
|
||||||
cls.correction_time -= host.frametime;
|
cls.correction_time -= host.frametime;
|
||||||
|
|
||||||
// Make sure smoothtime is postive
|
// Make sure smoothtime is postive
|
||||||
if( cl_smoothtime->value <= 0.0 )
|
if( cl_smoothtime.value <= 0.0f )
|
||||||
Cvar_DirectSet( cl_smoothtime, "0.1" );
|
Cvar_DirectSet( &cl_smoothtime, "0.1" );
|
||||||
|
|
||||||
// Clamp from 0 to cl_smoothtime.value
|
// Clamp from 0 to cl_smoothtime.value
|
||||||
cls.correction_time = bound( 0.0, cls.correction_time, cl_smoothtime->value );
|
cls.correction_time = bound( 0.0, cls.correction_time, cl_smoothtime.value );
|
||||||
|
|
||||||
// Compute backward interpolation fraction along full correction
|
// Compute backward interpolation fraction along full correction
|
||||||
frac = 1.0 - cls.correction_time / cl_smoothtime->value;
|
frac = 1.0f - cls.correction_time / cl_smoothtime.value;
|
||||||
|
|
||||||
// Determine how much error we still have to make up for
|
// Determine how much error we still have to make up for
|
||||||
VectorSubtract( cl.simorg, cl.local.lastorigin, delta );
|
VectorSubtract( cl.simorg, cl.local.lastorigin, delta );
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ GNU General Public License for more details.
|
|||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "net_encode.h"
|
#include "net_encode.h"
|
||||||
#include "particledef.h"
|
#include "particledef.h"
|
||||||
#include "gl_local.h"
|
|
||||||
#include "cl_tent.h"
|
#include "cl_tent.h"
|
||||||
#include "shake.h"
|
#include "shake.h"
|
||||||
#include "hltv.h"
|
#include "hltv.h"
|
||||||
@@ -86,7 +85,7 @@ static qboolean CL_QuakeEntityTeleported( cl_entity_t *ent, entity_state_t *news
|
|||||||
VectorSubtract( newstate->origin, ent->prevstate.origin, delta );
|
VectorSubtract( newstate->origin, ent->prevstate.origin, delta );
|
||||||
|
|
||||||
// compute potential max movement in units per frame and compare with entity movement
|
// compute potential max movement in units per frame and compare with entity movement
|
||||||
maxlen = ( clgame.movevars.maxvelocity * ( 1.0 / GAME_FPS ));
|
maxlen = ( clgame.movevars.maxvelocity * ( 1.0f / GAME_FPS ));
|
||||||
len = VectorLength( delta );
|
len = VectorLength( delta );
|
||||||
|
|
||||||
return (len > maxlen);
|
return (len > maxlen);
|
||||||
@@ -233,14 +232,10 @@ static void CL_ParseQuakeServerInfo( sizebuf_t *msg )
|
|||||||
// loading user settings
|
// loading user settings
|
||||||
CSCR_LoadDefaultCVars( "user.scr" );
|
CSCR_LoadDefaultCVars( "user.scr" );
|
||||||
|
|
||||||
if( r_decals->value > mp_decals.value )
|
if( r_decals.value > mp_decals.value )
|
||||||
Cvar_SetValue( "r_decals", mp_decals.value );
|
Cvar_DirectSet( &r_decals, mp_decals.string );
|
||||||
}
|
}
|
||||||
else Cvar_Reset( "r_decals" );
|
else Cvar_DirectSet( &r_decals, NULL );
|
||||||
|
|
||||||
// re-init mouse
|
|
||||||
if( cl.background )
|
|
||||||
host.mouse_visible = false;
|
|
||||||
|
|
||||||
if( cl.background ) // tell the game parts about background state
|
if( cl.background ) // tell the game parts about background state
|
||||||
Cvar_FullSet( "cl_background", "1", FCVAR_READ_ONLY );
|
Cvar_FullSet( "cl_background", "1", FCVAR_READ_ONLY );
|
||||||
@@ -263,7 +258,7 @@ static void CL_ParseQuakeServerInfo( sizebuf_t *msg )
|
|||||||
Q_strncpy( gameui.globals->maptitle, clgame.maptitle, sizeof( gameui.globals->maptitle ));
|
Q_strncpy( gameui.globals->maptitle, clgame.maptitle, sizeof( gameui.globals->maptitle ));
|
||||||
|
|
||||||
if( !cls.changelevel && !cls.changedemo )
|
if( !cls.changelevel && !cls.changedemo )
|
||||||
CL_InitEdicts (); // re-arrange edicts
|
CL_InitEdicts( cl.maxclients ); // re-arrange edicts
|
||||||
|
|
||||||
// Quake just have a large packet of initialization data
|
// Quake just have a large packet of initialization data
|
||||||
for( i = 1; i < MAX_MODELS; i++ )
|
for( i = 1; i < MAX_MODELS; i++ )
|
||||||
@@ -303,13 +298,13 @@ static void CL_ParseQuakeServerInfo( sizebuf_t *msg )
|
|||||||
|
|
||||||
// get splash name
|
// get splash name
|
||||||
if( cls.demoplayback && ( cls.demonum != -1 ))
|
if( cls.demoplayback && ( cls.demonum != -1 ))
|
||||||
Cvar_Set( "cl_levelshot_name", va( "levelshots/%s_%s", cls.demoname, glState.wideScreen ? "16x9" : "4x3" ));
|
Cvar_Set( "cl_levelshot_name", va( "levelshots/%s_%s", cls.demoname, refState.wideScreen ? "16x9" : "4x3" ));
|
||||||
else Cvar_Set( "cl_levelshot_name", va( "levelshots/%s_%s", clgame.mapname, glState.wideScreen ? "16x9" : "4x3" ));
|
else Cvar_Set( "cl_levelshot_name", va( "levelshots/%s_%s", clgame.mapname, refState.wideScreen ? "16x9" : "4x3" ));
|
||||||
Cvar_SetValue( "scr_loading", 0.0f ); // reset progress bar
|
Cvar_SetValue( "scr_loading", 0.0f ); // reset progress bar
|
||||||
|
|
||||||
if(( cl_allow_levelshots->value && !cls.changelevel ) || cl.background )
|
if(( cl_allow_levelshots.value && !cls.changelevel ) || cl.background )
|
||||||
{
|
{
|
||||||
if( !FS_FileExists( va( "%s.bmp", cl_levelshot_name->string ), true ))
|
if( !FS_FileExists( va( "%s.bmp", cl_levelshot_name.string ), true ))
|
||||||
Cvar_Set( "cl_levelshot_name", "*black" ); // render a black screen
|
Cvar_Set( "cl_levelshot_name", "*black" ); // render a black screen
|
||||||
cls.scrshot_request = scrshot_plaque; // request levelshot even if exist (check filetime)
|
cls.scrshot_request = scrshot_plaque; // request levelshot even if exist (check filetime)
|
||||||
}
|
}
|
||||||
@@ -419,7 +414,7 @@ If an entities model or origin changes from frame to frame, it must be
|
|||||||
relinked. Other attributes can change without relinking.
|
relinked. Other attributes can change without relinking.
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
void CL_ParseQuakeEntityData( sizebuf_t *msg, int bits )
|
static void CL_ParseQuakeEntityData( sizebuf_t *msg, int bits )
|
||||||
{
|
{
|
||||||
int i, newnum, pack;
|
int i, newnum, pack;
|
||||||
qboolean forcelink;
|
qboolean forcelink;
|
||||||
@@ -570,7 +565,7 @@ CL_ParseQuakeParticles
|
|||||||
|
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
void CL_ParseQuakeParticle( sizebuf_t *msg )
|
static void CL_ParseQuakeParticle( sizebuf_t *msg )
|
||||||
{
|
{
|
||||||
int count, color;
|
int count, color;
|
||||||
vec3_t org, dir;
|
vec3_t org, dir;
|
||||||
@@ -592,7 +587,7 @@ CL_ParseQuakeStaticSound
|
|||||||
|
|
||||||
===================
|
===================
|
||||||
*/
|
*/
|
||||||
void CL_ParseQuakeStaticSound( sizebuf_t *msg )
|
static void CL_ParseQuakeStaticSound( sizebuf_t *msg )
|
||||||
{
|
{
|
||||||
int sound_num;
|
int sound_num;
|
||||||
float vol, attn;
|
float vol, attn;
|
||||||
@@ -677,7 +672,7 @@ static void CL_ParseQuakeStaticEntity( sizebuf_t *msg )
|
|||||||
if( ent->model != NULL )
|
if( ent->model != NULL )
|
||||||
{
|
{
|
||||||
// auto 'solid' faces
|
// auto 'solid' faces
|
||||||
if( FBitSet( ent->model->flags, MODEL_TRANSPARENT ) && CL_IsQuakeCompatible( ))
|
if( FBitSet( ent->model->flags, MODEL_TRANSPARENT ) && Host_IsQuakeCompatible())
|
||||||
{
|
{
|
||||||
ent->curstate.rendermode = kRenderTransAlpha;
|
ent->curstate.rendermode = kRenderTransAlpha;
|
||||||
ent->curstate.renderamt = 255;
|
ent->curstate.renderamt = 255;
|
||||||
@@ -699,17 +694,13 @@ static void CL_ParseQuakeBaseline( sizebuf_t *msg )
|
|||||||
cl_entity_t *ent;
|
cl_entity_t *ent;
|
||||||
int newnum;
|
int newnum;
|
||||||
|
|
||||||
memset( &state, 0, sizeof( state ));
|
|
||||||
newnum = MSG_ReadWord( msg ); // entnum
|
newnum = MSG_ReadWord( msg ); // entnum
|
||||||
|
|
||||||
if( newnum >= clgame.maxEntities )
|
if( newnum >= clgame.maxEntities )
|
||||||
Host_Error( "CL_AllocEdict: no free edicts\n" );
|
Host_Error( "CL_AllocEdict: no free edicts\n" );
|
||||||
|
|
||||||
ent = CL_EDICT_NUM( newnum );
|
|
||||||
memset( &ent->prevstate, 0, sizeof( ent->prevstate ));
|
|
||||||
ent->index = newnum;
|
|
||||||
|
|
||||||
// parse baseline
|
// parse baseline
|
||||||
|
memset( &state, 0, sizeof( state ));
|
||||||
state.modelindex = MSG_ReadByte( msg );
|
state.modelindex = MSG_ReadByte( msg );
|
||||||
state.frame = MSG_ReadByte( msg );
|
state.frame = MSG_ReadByte( msg );
|
||||||
state.colormap = MSG_ReadByte( msg );
|
state.colormap = MSG_ReadByte( msg );
|
||||||
@@ -720,8 +711,10 @@ static void CL_ParseQuakeBaseline( sizebuf_t *msg )
|
|||||||
state.angles[1] = MSG_ReadAngle( msg );
|
state.angles[1] = MSG_ReadAngle( msg );
|
||||||
state.origin[2] = MSG_ReadCoord( msg );
|
state.origin[2] = MSG_ReadCoord( msg );
|
||||||
state.angles[2] = MSG_ReadAngle( msg );
|
state.angles[2] = MSG_ReadAngle( msg );
|
||||||
ent->player = CL_IsPlayerIndex( newnum );
|
|
||||||
|
|
||||||
|
ent = CL_EDICT_NUM( newnum );
|
||||||
|
ent->index = newnum;
|
||||||
|
ent->player = CL_IsPlayerIndex( newnum );
|
||||||
memcpy( &ent->baseline, &state, sizeof( entity_state_t ));
|
memcpy( &ent->baseline, &state, sizeof( entity_state_t ));
|
||||||
memcpy( &ent->prevstate, &state, sizeof( entity_state_t ));
|
memcpy( &ent->prevstate, &state, sizeof( entity_state_t ));
|
||||||
}
|
}
|
||||||
@@ -823,9 +816,12 @@ CL_QuakeStuffText
|
|||||||
|
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
void CL_QuakeStuffText( const char *text )
|
static void CL_QuakeStuffText( const char *text )
|
||||||
{
|
{
|
||||||
Q_strncat( cmd_buf, text, sizeof( cmd_buf ));
|
Q_strncat( cmd_buf, text, sizeof( cmd_buf ));
|
||||||
|
|
||||||
|
// a1ba: didn't filtered, anyway quake protocol
|
||||||
|
// only supported for demos, not network games
|
||||||
Cbuf_AddText( text );
|
Cbuf_AddText( text );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -835,7 +831,7 @@ CL_QuakeExecStuff
|
|||||||
|
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
void CL_QuakeExecStuff( void )
|
static void CL_QuakeExecStuff( void )
|
||||||
{
|
{
|
||||||
char *text = cmd_buf;
|
char *text = cmd_buf;
|
||||||
char token[256];
|
char token[256];
|
||||||
@@ -862,9 +858,7 @@ void CL_QuakeExecStuff( void )
|
|||||||
|
|
||||||
if( !*text ) break;
|
if( !*text ) break;
|
||||||
|
|
||||||
host.com_ignorebracket = true;
|
text = COM_ParseFileSafe( text, token, sizeof( token ), PFILE_IGNOREBRACKET, NULL, NULL );
|
||||||
text = COM_ParseFile( text, token );
|
|
||||||
host.com_ignorebracket = false;
|
|
||||||
|
|
||||||
if( !text ) break;
|
if( !text ) break;
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ GNU General Public License for more details.
|
|||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "gl_local.h"
|
|
||||||
#include "studio.h"
|
#include "studio.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -42,11 +41,24 @@ CL_CmpStudioTextures
|
|||||||
return true if equal
|
return true if equal
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
qboolean CL_CmpStudioTextures( int numtexs, mstudiotexture_t *p1, mstudiotexture_t *p2 )
|
static qboolean CL_CmpStudioTextures( int numtexs, mstudiotexture_t *p1, remap_info_t *remap )
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
mstudiotexture_t *p2;
|
||||||
|
|
||||||
if( !p1 || !p2 ) return false;
|
if( !p1 ) // no textures
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if( !remap ) // current model has no remap
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if( !remap->textures ) // shouldn't happen, just in case
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if( numtexs != remap->numtextures ) // amount of textures differs, it's a different model
|
||||||
|
return false;
|
||||||
|
|
||||||
|
p2 = remap->ptexture;
|
||||||
|
|
||||||
for( i = 0; i < numtexs; i++, p1++, p2++ )
|
for( i = 0; i < numtexs; i++, p1++, p2++ )
|
||||||
{
|
{
|
||||||
@@ -66,7 +78,7 @@ CL_CreateRawTextureFromPixels
|
|||||||
Convert texture_t struct into mstudiotexture_t prototype
|
Convert texture_t struct into mstudiotexture_t prototype
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
byte *CL_CreateRawTextureFromPixels( texture_t *tx, size_t *size, int topcolor, int bottomcolor )
|
static byte *CL_CreateRawTextureFromPixels( texture_t *tx, size_t *size, int topcolor, int bottomcolor )
|
||||||
{
|
{
|
||||||
static mstudiotexture_t pin;
|
static mstudiotexture_t pin;
|
||||||
byte *pal;
|
byte *pal;
|
||||||
@@ -78,7 +90,9 @@ byte *CL_CreateRawTextureFromPixels( texture_t *tx, size_t *size, int topcolor,
|
|||||||
// fill header
|
// fill header
|
||||||
if( !pin.name[0] ) Q_strncpy( pin.name, "#raw_remap_image.mdl", sizeof( pin.name ));
|
if( !pin.name[0] ) Q_strncpy( pin.name, "#raw_remap_image.mdl", sizeof( pin.name ));
|
||||||
pin.flags = STUDIO_NF_COLORMAP; // just in case :-)
|
pin.flags = STUDIO_NF_COLORMAP; // just in case :-)
|
||||||
pin.index = (int)(tx + 1); // pointer to pixels
|
//pin.index = (int)(tx + 1); // pointer to pixels
|
||||||
|
// no more pointer-to-int-to-pointer casts
|
||||||
|
Image_SetMDLPointer( (byte*)((texture_t *)tx + 1) );
|
||||||
pin.width = tx->width;
|
pin.width = tx->width;
|
||||||
pin.height = tx->height;
|
pin.height = tx->height;
|
||||||
|
|
||||||
@@ -97,24 +111,25 @@ CL_DuplicateTexture
|
|||||||
Dupliacte texture with remap pixels
|
Dupliacte texture with remap pixels
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
void CL_DuplicateTexture( mstudiotexture_t *ptexture, int topcolor, int bottomcolor )
|
static void CL_DuplicateTexture( cl_entity_t *entity, model_t *model, mstudiotexture_t *ptexture, int topcolor, int bottomcolor )
|
||||||
{
|
{
|
||||||
gl_texture_t *glt;
|
const char *name;
|
||||||
texture_t *tx = NULL;
|
texture_t *tx = NULL;
|
||||||
char texname[128];
|
char texname[128];
|
||||||
int i, size, index;
|
int i, index;
|
||||||
|
size_t size;
|
||||||
byte paletteBackup[768];
|
byte paletteBackup[768];
|
||||||
byte *raw, *pal;
|
byte *raw, *pal;
|
||||||
|
|
||||||
// save off the real texture index
|
// save off the real texture index
|
||||||
index = ptexture->index;
|
index = ptexture->index;
|
||||||
glt = R_GetTexture( index );
|
name = ref.dllFuncs.GL_TextureName( index );
|
||||||
Q_snprintf( texname, sizeof( texname ), "#%i_%s", RI.currententity->curstate.number, glt->name + 1 );
|
Q_snprintf( texname, sizeof( texname ), "#%i_%s", entity->curstate.number, name + 1 );
|
||||||
|
|
||||||
// search for pixels
|
// search for pixels
|
||||||
for( i = 0; i < RI.currentmodel->numtextures; i++ )
|
for( i = 0; i < model->numtextures; i++ )
|
||||||
{
|
{
|
||||||
tx = RI.currentmodel->textures[i];
|
tx = model->textures[i];
|
||||||
if( tx->gl_texturenum == index )
|
if( tx->gl_texturenum == index )
|
||||||
break; // found
|
break; // found
|
||||||
}
|
}
|
||||||
@@ -126,7 +141,7 @@ void CL_DuplicateTexture( mstudiotexture_t *ptexture, int topcolor, int bottomco
|
|||||||
memcpy( paletteBackup, pal, 768 );
|
memcpy( paletteBackup, pal, 768 );
|
||||||
|
|
||||||
raw = CL_CreateRawTextureFromPixels( tx, &size, topcolor, bottomcolor );
|
raw = CL_CreateRawTextureFromPixels( tx, &size, topcolor, bottomcolor );
|
||||||
ptexture->index = GL_LoadTexture( texname, raw, size, TF_FORCE_COLOR ); // do copy
|
ptexture->index = ref.dllFuncs.GL_LoadTexture( texname, raw, size, TF_FORCE_COLOR ); // do copy
|
||||||
|
|
||||||
// restore original palette
|
// restore original palette
|
||||||
memcpy( pal, paletteBackup, 768 );
|
memcpy( pal, paletteBackup, 768 );
|
||||||
@@ -139,32 +154,33 @@ CL_UpdateStudioTexture
|
|||||||
Update texture top and bottom colors
|
Update texture top and bottom colors
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
void CL_UpdateStudioTexture( mstudiotexture_t *ptexture, int topcolor, int bottomcolor )
|
static void CL_UpdateStudioTexture( cl_entity_t *entity, mstudiotexture_t *ptexture, int topcolor, int bottomcolor )
|
||||||
{
|
{
|
||||||
gl_texture_t *glt;
|
|
||||||
rgbdata_t *pic;
|
rgbdata_t *pic;
|
||||||
texture_t *tx = NULL;
|
texture_t *tx = NULL;
|
||||||
char texname[128], name[128], mdlname[128];
|
char texname[128], name[128], mdlname[128];
|
||||||
int i, size, index;
|
const char *origtexname;
|
||||||
|
int i, index;
|
||||||
|
size_t size;
|
||||||
byte paletteBackup[768];
|
byte paletteBackup[768];
|
||||||
byte *raw, *pal;
|
byte *raw, *pal;
|
||||||
|
|
||||||
// save off the real texture index
|
// save off the real texture index
|
||||||
glt = R_GetTexture( ptexture->index );
|
origtexname = ref.dllFuncs.GL_TextureName( ptexture->index );
|
||||||
|
|
||||||
// build name of original texture
|
// build name of original texture
|
||||||
Q_strncpy( mdlname, RI.currentmodel->name, sizeof( mdlname ));
|
Q_strncpy( mdlname, entity->model->name, sizeof( mdlname ));
|
||||||
COM_FileBase( ptexture->name, name );
|
COM_FileBase( ptexture->name, name, sizeof( name ));
|
||||||
COM_StripExtension( mdlname );
|
COM_StripExtension( mdlname );
|
||||||
|
|
||||||
Q_snprintf( texname, sizeof( texname ), "#%s/%s.mdl", mdlname, name );
|
Q_snprintf( texname, sizeof( texname ), "#%s/%s.mdl", mdlname, name );
|
||||||
index = GL_FindTexture( texname );
|
index = ref.dllFuncs.GL_FindTexture( texname );
|
||||||
if( !index ) return; // couldn't find texture
|
if( !index ) return; // couldn't find texture
|
||||||
|
|
||||||
// search for pixels
|
// search for pixels
|
||||||
for( i = 0; i < RI.currentmodel->numtextures; i++ )
|
for( i = 0; i < entity->model->numtextures; i++ )
|
||||||
{
|
{
|
||||||
tx = RI.currentmodel->textures[i];
|
tx = entity->model->textures[i];
|
||||||
if( tx->gl_texturenum == index )
|
if( tx->gl_texturenum == index )
|
||||||
break; // found
|
break; // found
|
||||||
}
|
}
|
||||||
@@ -176,14 +192,14 @@ void CL_UpdateStudioTexture( mstudiotexture_t *ptexture, int topcolor, int botto
|
|||||||
memcpy( paletteBackup, pal, 768 );
|
memcpy( paletteBackup, pal, 768 );
|
||||||
|
|
||||||
raw = CL_CreateRawTextureFromPixels( tx, &size, topcolor, bottomcolor );
|
raw = CL_CreateRawTextureFromPixels( tx, &size, topcolor, bottomcolor );
|
||||||
pic = FS_LoadImage( glt->name, raw, size );
|
pic = FS_LoadImage( origtexname, raw, size );
|
||||||
if( !pic )
|
if( !pic )
|
||||||
{
|
{
|
||||||
Con_DPrintf( S_ERROR "Couldn't update texture %s\n", glt->name );
|
Con_DPrintf( S_ERROR "Couldn't update texture %s\n", origtexname );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
index = GL_UpdateTextureInternal( glt->name, pic, 0 );
|
index = GL_UpdateTextureInternal( origtexname, pic, 0 );
|
||||||
FS_FreeImage( pic );
|
FS_FreeImage( pic );
|
||||||
|
|
||||||
// restore original palette
|
// restore original palette
|
||||||
@@ -199,21 +215,21 @@ CL_UpdateAliasTexture
|
|||||||
Update texture top and bottom colors
|
Update texture top and bottom colors
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
void CL_UpdateAliasTexture( unsigned short *texture, int skinnum, int topcolor, int bottomcolor )
|
static void CL_UpdateAliasTexture( cl_entity_t *entity, unsigned short *texture, int skinnum, int topcolor, int bottomcolor )
|
||||||
{
|
{
|
||||||
char texname[MAX_QPATH];
|
char texname[MAX_QPATH];
|
||||||
rgbdata_t skin, *pic;
|
rgbdata_t skin, *pic;
|
||||||
texture_t *tx;
|
texture_t *tx;
|
||||||
|
|
||||||
if( !texture || !RI.currentmodel->textures )
|
if( !texture || !entity->model->textures )
|
||||||
return; // no remapinfo in model
|
return; // no remapinfo in model
|
||||||
|
|
||||||
tx = RI.currentmodel->textures[skinnum];
|
tx = entity->model->textures[skinnum];
|
||||||
if( !tx ) return; // missing texture ?
|
if( !tx ) return; // missing texture ?
|
||||||
|
|
||||||
if( *texture == 0 )
|
if( *texture == 0 )
|
||||||
{
|
{
|
||||||
Q_snprintf( texname, sizeof( texname ), "%s:remap%i_%i", RI.currentmodel->name, skinnum, RI.currententity->index );
|
Q_snprintf( texname, sizeof( texname ), "%s:remap%i_%i", entity->model->name, skinnum, entity->index );
|
||||||
skin.width = tx->width;
|
skin.width = tx->width;
|
||||||
skin.height = tx->height;
|
skin.height = tx->height;
|
||||||
skin.depth = skin.numMips = 1;
|
skin.depth = skin.numMips = 1;
|
||||||
@@ -228,7 +244,69 @@ void CL_UpdateAliasTexture( unsigned short *texture, int skinnum, int topcolor,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// and now we can remap with internal routines
|
// and now we can remap with internal routines
|
||||||
GL_ProcessTexture( *texture, -1.0f, topcolor, bottomcolor );
|
ref.dllFuncs.GL_ProcessTexture( *texture, -1.0f, topcolor, bottomcolor );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
====================
|
||||||
|
CL_FreeRemapInfo
|
||||||
|
|
||||||
|
Release remap info per entity
|
||||||
|
====================
|
||||||
|
*/
|
||||||
|
static void CL_FreeRemapInfo( remap_info_t *info )
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
Assert( info != NULL );
|
||||||
|
|
||||||
|
// release all colormap texture copies
|
||||||
|
for( i = 0; i < info->numtextures; i++ )
|
||||||
|
{
|
||||||
|
if( info->ptexture != NULL )
|
||||||
|
{
|
||||||
|
if( FBitSet( info->ptexture[i].flags, STUDIO_NF_COLORMAP ))
|
||||||
|
ref.dllFuncs.GL_FreeTexture( info->ptexture[i].index );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( info->textures[i] != 0 )
|
||||||
|
ref.dllFuncs.GL_FreeTexture( info->textures[i] );
|
||||||
|
}
|
||||||
|
|
||||||
|
Mem_Free( info ); // release struct
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
====================
|
||||||
|
CL_UpdateRemapInfo
|
||||||
|
|
||||||
|
Update all remaps per entity
|
||||||
|
====================
|
||||||
|
*/
|
||||||
|
static void CL_UpdateRemapInfo( cl_entity_t *entity, int topcolor, int bottomcolor )
|
||||||
|
{
|
||||||
|
remap_info_t *info;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
i = ( entity == &clgame.viewent ) ? clgame.maxEntities : entity->curstate.number;
|
||||||
|
info = clgame.remap_info[i];
|
||||||
|
if( !info ) return; // no remap info
|
||||||
|
|
||||||
|
if( info->topcolor == topcolor && info->bottomcolor == bottomcolor )
|
||||||
|
return; // values is valid
|
||||||
|
|
||||||
|
for( i = 0; i < info->numtextures; i++ )
|
||||||
|
{
|
||||||
|
if( info->ptexture != NULL )
|
||||||
|
{
|
||||||
|
if( FBitSet( info->ptexture[i].flags, STUDIO_NF_COLORMAP ))
|
||||||
|
CL_UpdateStudioTexture( entity, &info->ptexture[i], topcolor, bottomcolor );
|
||||||
|
}
|
||||||
|
else CL_UpdateAliasTexture( entity, &info->textures[i], i, topcolor, bottomcolor );
|
||||||
|
}
|
||||||
|
|
||||||
|
info->topcolor = topcolor;
|
||||||
|
info->bottomcolor = bottomcolor;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -239,7 +317,7 @@ Allocate new remap info per entity
|
|||||||
and make copy of remap textures
|
and make copy of remap textures
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
void CL_AllocRemapInfo( int topcolor, int bottomcolor )
|
static void CL_AllocRemapInfo( cl_entity_t *entity, model_t *model, int topcolor, int bottomcolor )
|
||||||
{
|
{
|
||||||
remap_info_t *info;
|
remap_info_t *info;
|
||||||
studiohdr_t *phdr;
|
studiohdr_t *phdr;
|
||||||
@@ -247,10 +325,10 @@ void CL_AllocRemapInfo( int topcolor, int bottomcolor )
|
|||||||
mstudiotexture_t *src, *dst;
|
mstudiotexture_t *src, *dst;
|
||||||
int i, size;
|
int i, size;
|
||||||
|
|
||||||
if( !RI.currententity ) return;
|
if( !entity ) return;
|
||||||
i = ( RI.currententity == &clgame.viewent ) ? clgame.maxEntities : RI.currententity->curstate.number;
|
i = ( entity == &clgame.viewent ) ? clgame.maxEntities : entity->curstate.number;
|
||||||
|
|
||||||
if( !RI.currentmodel || ( RI.currentmodel->type != mod_alias && RI.currentmodel->type != mod_studio ))
|
if( !model || ( model->type != mod_alias && model->type != mod_studio ))
|
||||||
{
|
{
|
||||||
// entity has changed model by another type, release remap info
|
// entity has changed model by another type, release remap info
|
||||||
if( clgame.remap_info[i] )
|
if( clgame.remap_info[i] )
|
||||||
@@ -262,7 +340,7 @@ void CL_AllocRemapInfo( int topcolor, int bottomcolor )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// model doesn't contains remap textures
|
// model doesn't contains remap textures
|
||||||
if( RI.currentmodel->numtextures <= 0 )
|
if( model->numtextures <= 0 )
|
||||||
{
|
{
|
||||||
// entity has changed model with no remap textures
|
// entity has changed model with no remap textures
|
||||||
if( clgame.remap_info[i] )
|
if( clgame.remap_info[i] )
|
||||||
@@ -273,16 +351,15 @@ void CL_AllocRemapInfo( int topcolor, int bottomcolor )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( RI.currentmodel->type == mod_studio )
|
if( model->type == mod_studio )
|
||||||
{
|
{
|
||||||
phdr = (studiohdr_t *)Mod_StudioExtradata( RI.currentmodel );
|
phdr = (studiohdr_t *)Mod_StudioExtradata( model );
|
||||||
if( !phdr ) return; // bad model?
|
if( !phdr ) return; // bad model?
|
||||||
|
|
||||||
src = (mstudiotexture_t *)(((byte *)phdr) + phdr->textureindex);
|
src = (mstudiotexture_t *)(((byte *)phdr) + phdr->textureindex);
|
||||||
dst = (clgame.remap_info[i] ? clgame.remap_info[i]->ptexture : NULL);
|
|
||||||
|
|
||||||
// NOTE: we must copy all the structures 'mstudiotexture_t' for easy access when model is rendering
|
// NOTE: we must copy all the structures 'mstudiotexture_t' for easy access when model is rendering
|
||||||
if( !CL_CmpStudioTextures( phdr->numtextures, src, dst ) || clgame.remap_info[i]->model != RI.currentmodel )
|
if( !CL_CmpStudioTextures( phdr->numtextures, src, clgame.remap_info[i] ) || clgame.remap_info[i]->model != model )
|
||||||
{
|
{
|
||||||
// this code catches studiomodel change with another studiomodel with remap textures
|
// this code catches studiomodel change with another studiomodel with remap textures
|
||||||
// e.g. playermodel 'barney' with playermodel 'gordon'
|
// e.g. playermodel 'barney' with playermodel 'gordon'
|
||||||
@@ -311,16 +388,16 @@ void CL_AllocRemapInfo( int topcolor, int bottomcolor )
|
|||||||
for( i = 0; i < info->numtextures; i++ )
|
for( i = 0; i < info->numtextures; i++ )
|
||||||
{
|
{
|
||||||
if( dst[i].flags & STUDIO_NF_COLORMAP )
|
if( dst[i].flags & STUDIO_NF_COLORMAP )
|
||||||
CL_DuplicateTexture( &dst[i], topcolor, bottomcolor );
|
CL_DuplicateTexture( entity, model, &dst[i], topcolor, bottomcolor );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( RI.currentmodel->type == mod_alias )
|
else if( model->type == mod_alias )
|
||||||
{
|
{
|
||||||
ahdr = (aliashdr_t *)Mod_AliasExtradata( RI.currentmodel );
|
ahdr = (aliashdr_t *)Mod_AliasExtradata( model );
|
||||||
if( !ahdr ) return; // bad model?
|
if( !ahdr ) return; // bad model?
|
||||||
|
|
||||||
// NOTE: we must copy all the structures 'mstudiotexture_t' for easy access when model is rendering
|
// NOTE: we must copy all the structures 'mstudiotexture_t' for easy access when model is rendering
|
||||||
if( !clgame.remap_info[i] || clgame.remap_info[i]->model != RI.currentmodel )
|
if( !clgame.remap_info[i] || clgame.remap_info[i]->model != model )
|
||||||
{
|
{
|
||||||
// this code catches studiomodel change with another studiomodel with remap textures
|
// this code catches studiomodel change with another studiomodel with remap textures
|
||||||
// e.g. playermodel 'barney' with playermodel 'gordon'
|
// e.g. playermodel 'barney' with playermodel 'gordon'
|
||||||
@@ -333,10 +410,10 @@ void CL_AllocRemapInfo( int topcolor, int bottomcolor )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
info->numtextures = RI.currentmodel->numtextures;
|
info->numtextures = model->numtextures;
|
||||||
|
|
||||||
// alias remapping is easy
|
// alias remapping is easy
|
||||||
CL_UpdateRemapInfo( topcolor, bottomcolor );
|
CL_UpdateRemapInfo( entity, topcolor, bottomcolor );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -344,69 +421,7 @@ void CL_AllocRemapInfo( int topcolor, int bottomcolor )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
info->model = RI.currentmodel;
|
info->model = model;
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
====================
|
|
||||||
CL_UpdateRemapInfo
|
|
||||||
|
|
||||||
Update all remaps per entity
|
|
||||||
====================
|
|
||||||
*/
|
|
||||||
void CL_UpdateRemapInfo( int topcolor, int bottomcolor )
|
|
||||||
{
|
|
||||||
remap_info_t *info;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
i = ( RI.currententity == &clgame.viewent ) ? clgame.maxEntities : RI.currententity->curstate.number;
|
|
||||||
info = clgame.remap_info[i];
|
|
||||||
if( !info ) return; // no remap info
|
|
||||||
|
|
||||||
if( info->topcolor == topcolor && info->bottomcolor == bottomcolor )
|
|
||||||
return; // values is valid
|
|
||||||
|
|
||||||
for( i = 0; i < info->numtextures; i++ )
|
|
||||||
{
|
|
||||||
if( info->ptexture != NULL )
|
|
||||||
{
|
|
||||||
if( FBitSet( info->ptexture[i].flags, STUDIO_NF_COLORMAP ))
|
|
||||||
CL_UpdateStudioTexture( &info->ptexture[i], topcolor, bottomcolor );
|
|
||||||
}
|
|
||||||
else CL_UpdateAliasTexture( &info->textures[i], i, topcolor, bottomcolor );
|
|
||||||
}
|
|
||||||
|
|
||||||
info->topcolor = topcolor;
|
|
||||||
info->bottomcolor = bottomcolor;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
====================
|
|
||||||
CL_FreeRemapInfo
|
|
||||||
|
|
||||||
Release remap info per entity
|
|
||||||
====================
|
|
||||||
*/
|
|
||||||
void CL_FreeRemapInfo( remap_info_t *info )
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
Assert( info != NULL );
|
|
||||||
|
|
||||||
// release all colormap texture copies
|
|
||||||
for( i = 0; i < info->numtextures; i++ )
|
|
||||||
{
|
|
||||||
if( info->ptexture != NULL )
|
|
||||||
{
|
|
||||||
if( FBitSet( info->ptexture[i].flags, STUDIO_NF_COLORMAP ))
|
|
||||||
GL_FreeTexture( info->ptexture[i].index );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( info->textures[i] != 0 )
|
|
||||||
GL_FreeTexture( info->textures[i] );
|
|
||||||
}
|
|
||||||
|
|
||||||
Mem_Free( info ); // release struct
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -431,3 +446,21 @@ void CL_ClearAllRemaps( void )
|
|||||||
}
|
}
|
||||||
clgame.remap_info = NULL;
|
clgame.remap_info = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
=============
|
||||||
|
CL_EntitySetRemapColors
|
||||||
|
=============
|
||||||
|
*/
|
||||||
|
qboolean CL_EntitySetRemapColors( cl_entity_t *e, model_t *mod, int top, int bottom )
|
||||||
|
{
|
||||||
|
CL_AllocRemapInfo( e, mod, top, bottom );
|
||||||
|
|
||||||
|
if( CL_GetRemapInfoForEntity( e ))
|
||||||
|
{
|
||||||
|
CL_UpdateRemapInfo( e, top, bottom );
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|||||||
356
engine/client/cl_render.c
Normal file
356
engine/client/cl_render.c
Normal file
@@ -0,0 +1,356 @@
|
|||||||
|
/*
|
||||||
|
cl_render.c - RenderAPI loader & implementation
|
||||||
|
Copyright (C) 2019 a1batross
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "library.h"
|
||||||
|
#include "platform/platform.h"
|
||||||
|
|
||||||
|
int R_FatPVS( const vec3_t org, float radius, byte *visbuffer, qboolean merge, qboolean fullvis )
|
||||||
|
{
|
||||||
|
return Mod_FatPVS( org, radius, visbuffer, world.visbytes, merge, fullvis );
|
||||||
|
}
|
||||||
|
|
||||||
|
lightstyle_t *CL_GetLightStyle( int number )
|
||||||
|
{
|
||||||
|
Assert( number >= 0 && number < MAX_LIGHTSTYLES );
|
||||||
|
return &cl.lightstyles[number];
|
||||||
|
}
|
||||||
|
|
||||||
|
const ref_overview_t *GL_GetOverviewParms( void )
|
||||||
|
{
|
||||||
|
return &clgame.overView;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void *R_Mem_Alloc( size_t cb, const char *filename, const int fileline )
|
||||||
|
{
|
||||||
|
return _Mem_Alloc( cls.mempool, cb, true, filename, fileline );
|
||||||
|
}
|
||||||
|
|
||||||
|
static void R_Mem_Free( void *mem, const char *filename, const int fileline )
|
||||||
|
{
|
||||||
|
if( !mem ) return;
|
||||||
|
_Mem_Free( mem, filename, fileline );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
=========
|
||||||
|
pfnGetFilesList
|
||||||
|
|
||||||
|
=========
|
||||||
|
*/
|
||||||
|
static char **pfnGetFilesList( const char *pattern, int *numFiles, int gamedironly )
|
||||||
|
{
|
||||||
|
static search_t *t = NULL;
|
||||||
|
|
||||||
|
if( t ) Mem_Free( t ); // release prev search
|
||||||
|
|
||||||
|
t = FS_Search( pattern, true, gamedironly );
|
||||||
|
|
||||||
|
if( !t )
|
||||||
|
{
|
||||||
|
if( numFiles ) *numFiles = 0;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( numFiles ) *numFiles = t->numfilenames;
|
||||||
|
return t->filenames;
|
||||||
|
}
|
||||||
|
|
||||||
|
static uint pfnFileBufferCRC32( const void *buffer, const int length )
|
||||||
|
{
|
||||||
|
uint modelCRC = 0;
|
||||||
|
|
||||||
|
if( !buffer || length <= 0 )
|
||||||
|
return modelCRC;
|
||||||
|
|
||||||
|
CRC32_Init( &modelCRC );
|
||||||
|
CRC32_ProcessBuffer( &modelCRC, buffer, length );
|
||||||
|
return CRC32_Final( modelCRC );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
=================
|
||||||
|
R_EnvShot
|
||||||
|
|
||||||
|
=================
|
||||||
|
*/
|
||||||
|
static void R_EnvShot( const float *vieworg, const char *name, qboolean skyshot, int shotsize )
|
||||||
|
{
|
||||||
|
static vec3_t viewPoint;
|
||||||
|
|
||||||
|
if( !COM_CheckString( name ))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if( cls.scrshot_action != scrshot_inactive )
|
||||||
|
{
|
||||||
|
if( cls.scrshot_action != scrshot_skyshot && cls.scrshot_action != scrshot_envshot )
|
||||||
|
Con_Printf( S_ERROR "R_%sShot: subsystem is busy, try for next frame.\n", skyshot ? "Sky" : "Env" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
cls.envshot_vieworg = NULL; // use client view
|
||||||
|
Q_strncpy( cls.shotname, name, sizeof( cls.shotname ));
|
||||||
|
|
||||||
|
if( vieworg )
|
||||||
|
{
|
||||||
|
// make sure what viewpoint don't temporare
|
||||||
|
VectorCopy( vieworg, viewPoint );
|
||||||
|
cls.envshot_vieworg = viewPoint;
|
||||||
|
cls.envshot_disable_vis = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// make request for envshot
|
||||||
|
if( skyshot ) cls.scrshot_action = scrshot_skyshot;
|
||||||
|
else cls.scrshot_action = scrshot_envshot;
|
||||||
|
|
||||||
|
// catch negative values
|
||||||
|
cls.envshot_viewsize = Q_max( 0, shotsize );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
=============
|
||||||
|
CL_GenericHandle
|
||||||
|
|
||||||
|
=============
|
||||||
|
*/
|
||||||
|
static const char *CL_GenericHandle( int fileindex )
|
||||||
|
{
|
||||||
|
if( fileindex < 0 || fileindex >= MAX_CUSTOM )
|
||||||
|
return 0;
|
||||||
|
return cl.files_precache[fileindex];
|
||||||
|
}
|
||||||
|
|
||||||
|
intptr_t CL_RenderGetParm( const int parm, const int arg, const qboolean checkRef )
|
||||||
|
{
|
||||||
|
switch( parm )
|
||||||
|
{
|
||||||
|
case PARM_BSP2_SUPPORTED:
|
||||||
|
#ifdef SUPPORT_BSP2_FORMAT
|
||||||
|
return 1;
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
case PARAM_GAMEPAUSED:
|
||||||
|
return cl.paused;
|
||||||
|
case PARM_CLIENT_INGAME:
|
||||||
|
return CL_IsInGame();
|
||||||
|
case PARM_MAX_ENTITIES:
|
||||||
|
return clgame.maxEntities;
|
||||||
|
case PARM_FEATURES:
|
||||||
|
return host.features;
|
||||||
|
case PARM_MAP_HAS_DELUXE:
|
||||||
|
return FBitSet( world.flags, FWORLD_HAS_DELUXEMAP );
|
||||||
|
case PARM_CLIENT_ACTIVE:
|
||||||
|
return (cls.state == ca_active);
|
||||||
|
case PARM_DEDICATED_SERVER:
|
||||||
|
return (host.type == HOST_DEDICATED);
|
||||||
|
case PARM_WATER_ALPHA:
|
||||||
|
return FBitSet( world.flags, FWORLD_WATERALPHA );
|
||||||
|
case PARM_DELUXEDATA:
|
||||||
|
return (intptr_t)world.deluxedata;
|
||||||
|
case PARM_SHADOWDATA:
|
||||||
|
return (intptr_t)world.shadowdata;
|
||||||
|
case PARM_FULLSCREEN:
|
||||||
|
return refState.fullScreen;
|
||||||
|
case PARM_WIDESCREEN:
|
||||||
|
return refState.wideScreen;
|
||||||
|
case PARM_SCREEN_WIDTH:
|
||||||
|
return refState.width;
|
||||||
|
case PARM_SCREEN_HEIGHT:
|
||||||
|
return refState.height;
|
||||||
|
default:
|
||||||
|
// indicates call from client.dll
|
||||||
|
if( checkRef )
|
||||||
|
{
|
||||||
|
return ref.dllFuncs.RefGetParm( parm, arg );
|
||||||
|
}
|
||||||
|
// call issued from ref_dll, check extensions here
|
||||||
|
else switch( parm )
|
||||||
|
{
|
||||||
|
case PARM_DEV_OVERVIEW:
|
||||||
|
return CL_IsDevOverviewMode();
|
||||||
|
case PARM_THIRDPERSON:
|
||||||
|
return CL_IsThirdPerson();
|
||||||
|
case PARM_QUAKE_COMPATIBLE:
|
||||||
|
return Host_IsQuakeCompatible();
|
||||||
|
case PARM_CONNSTATE:
|
||||||
|
return (int)cls.state;
|
||||||
|
case PARM_PLAYING_DEMO:
|
||||||
|
return cls.demoplayback;
|
||||||
|
case PARM_WATER_LEVEL:
|
||||||
|
return cl.local.waterlevel;
|
||||||
|
case PARM_LOCAL_HEALTH:
|
||||||
|
return cl.local.health;
|
||||||
|
case PARM_LOCAL_GAME:
|
||||||
|
return Host_IsLocalGame();
|
||||||
|
case PARM_NUMENTITIES:
|
||||||
|
return pfnNumberOfEntities();
|
||||||
|
case PARM_GET_CLIENT_PTR:
|
||||||
|
return (intptr_t)&cl.time; // with the offset
|
||||||
|
case PARM_GET_HOST_PTR:
|
||||||
|
return (intptr_t)&host.realtime; // with the offset
|
||||||
|
case PARM_GET_WORLD_PTR:
|
||||||
|
return (intptr_t)&world;
|
||||||
|
case PARM_GET_MOVEVARS_PTR:
|
||||||
|
return (intptr_t)&clgame.movevars;
|
||||||
|
case PARM_GET_PALETTE_PTR:
|
||||||
|
return (intptr_t)&clgame.palette;
|
||||||
|
case PARM_GET_VIEWENT_PTR:
|
||||||
|
return (intptr_t)&clgame.viewent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static intptr_t pfnRenderGetParm( int parm, int arg )
|
||||||
|
{
|
||||||
|
return CL_RenderGetParm( parm, arg, true );
|
||||||
|
}
|
||||||
|
|
||||||
|
static render_api_t gRenderAPI =
|
||||||
|
{
|
||||||
|
pfnRenderGetParm, // GL_RenderGetParm,
|
||||||
|
NULL, // R_GetDetailScaleForTexture,
|
||||||
|
NULL, // R_GetExtraParmsForTexture,
|
||||||
|
CL_GetLightStyle,
|
||||||
|
CL_GetDynamicLight,
|
||||||
|
CL_GetEntityLight,
|
||||||
|
LightToTexGamma,
|
||||||
|
NULL, // R_GetFrameTime,
|
||||||
|
NULL, // R_SetCurrentEntity,
|
||||||
|
NULL, // R_SetCurrentModel,
|
||||||
|
R_FatPVS,
|
||||||
|
R_StoreEfrags,
|
||||||
|
NULL, // GL_FindTexture,
|
||||||
|
NULL, // GL_TextureName,
|
||||||
|
NULL, // GL_TextureData,
|
||||||
|
NULL, // GL_LoadTexture,
|
||||||
|
NULL, // GL_CreateTexture,
|
||||||
|
NULL, // GL_LoadTextureArray,
|
||||||
|
NULL, // GL_CreateTextureArray,
|
||||||
|
NULL, // GL_FreeTexture,
|
||||||
|
NULL, // DrawSingleDecal,
|
||||||
|
NULL, // R_DecalSetupVerts,
|
||||||
|
NULL, // R_EntityRemoveDecals,
|
||||||
|
(void*)AVI_LoadVideo,
|
||||||
|
(void*)AVI_GetVideoInfo,
|
||||||
|
(void*)AVI_GetVideoFrameNumber,
|
||||||
|
(void*)AVI_GetVideoFrame,
|
||||||
|
NULL, // R_UploadStretchRaw,
|
||||||
|
(void*)AVI_FreeVideo,
|
||||||
|
(void*)AVI_IsActive,
|
||||||
|
S_StreamAviSamples,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL, // GL_Bind,
|
||||||
|
NULL, // GL_SelectTexture,
|
||||||
|
NULL, // GL_LoadTexMatrixExt,
|
||||||
|
NULL, // GL_LoadIdentityTexMatrix,
|
||||||
|
NULL, // GL_CleanUpTextureUnits,
|
||||||
|
NULL, // GL_TexGen,
|
||||||
|
NULL, // GL_TextureTarget,
|
||||||
|
NULL, // GL_SetTexCoordArrayMode,
|
||||||
|
NULL, // GL_GetProcAddress,
|
||||||
|
NULL, // GL_UpdateTexSize,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL, // CL_DrawParticlesExternal,
|
||||||
|
R_EnvShot,
|
||||||
|
pfnSPR_LoadExt,
|
||||||
|
NULL, // R_LightVec,
|
||||||
|
NULL, // R_StudioGetTexture,
|
||||||
|
GL_GetOverviewParms,
|
||||||
|
CL_GenericHandle,
|
||||||
|
COM_SaveFile,
|
||||||
|
NULL,
|
||||||
|
R_Mem_Alloc,
|
||||||
|
R_Mem_Free,
|
||||||
|
pfnGetFilesList,
|
||||||
|
pfnFileBufferCRC32,
|
||||||
|
COM_CompareFileTime,
|
||||||
|
Host_Error,
|
||||||
|
(void*)CL_ModelHandle,
|
||||||
|
pfnTime,
|
||||||
|
Cvar_Set,
|
||||||
|
S_FadeMusicVolume,
|
||||||
|
COM_SetRandomSeed,
|
||||||
|
};
|
||||||
|
|
||||||
|
static void R_FillRenderAPIFromRef( render_api_t *to, const ref_interface_t *from )
|
||||||
|
{
|
||||||
|
to->GetDetailScaleForTexture = from->GetDetailScaleForTexture;
|
||||||
|
to->GetExtraParmsForTexture = from->GetExtraParmsForTexture;
|
||||||
|
to->GetFrameTime = from->GetFrameTime;
|
||||||
|
to->R_SetCurrentEntity = from->R_SetCurrentEntity;
|
||||||
|
to->R_SetCurrentModel = from->R_SetCurrentModel;
|
||||||
|
to->GL_FindTexture = from->GL_FindTexture;
|
||||||
|
to->GL_TextureName = from->GL_TextureName;
|
||||||
|
to->GL_TextureData = from->GL_TextureData;
|
||||||
|
to->GL_LoadTexture = from->GL_LoadTexture;
|
||||||
|
to->GL_CreateTexture = from->GL_CreateTexture;
|
||||||
|
to->GL_LoadTextureArray = from->GL_LoadTextureArray;
|
||||||
|
to->GL_CreateTextureArray = from->GL_CreateTextureArray;
|
||||||
|
to->GL_FreeTexture = from->GL_FreeTexture;
|
||||||
|
to->DrawSingleDecal = from->DrawSingleDecal;
|
||||||
|
to->R_DecalSetupVerts = from->R_DecalSetupVerts;
|
||||||
|
to->R_EntityRemoveDecals = from->R_EntityRemoveDecals;
|
||||||
|
to->AVI_UploadRawFrame = from->AVI_UploadRawFrame;
|
||||||
|
to->GL_Bind = from->GL_Bind;
|
||||||
|
to->GL_SelectTexture = from->GL_SelectTexture;
|
||||||
|
to->GL_LoadTextureMatrix = from->GL_LoadTextureMatrix;
|
||||||
|
to->GL_TexMatrixIdentity = from->GL_TexMatrixIdentity;
|
||||||
|
to->GL_CleanUpTextureUnits = from->GL_CleanUpTextureUnits;
|
||||||
|
to->GL_TexGen = from->GL_TexGen;
|
||||||
|
to->GL_TextureTarget = from->GL_TextureTarget;
|
||||||
|
to->GL_TexCoordArrayMode = from->GL_TexCoordArrayMode;
|
||||||
|
to->GL_UpdateTexSize = from->GL_UpdateTexSize;
|
||||||
|
to->GL_DrawParticles = from->GL_DrawParticles;
|
||||||
|
to->LightVec = from->LightVec;
|
||||||
|
to->StudioGetTexture = from->StudioGetTexture;
|
||||||
|
to->GL_GetProcAddress = from->R_GetProcAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
===============
|
||||||
|
R_InitRenderAPI
|
||||||
|
|
||||||
|
Initialize client external rendering
|
||||||
|
===============
|
||||||
|
*/
|
||||||
|
qboolean R_InitRenderAPI( void )
|
||||||
|
{
|
||||||
|
// make sure what render functions is cleared
|
||||||
|
memset( &clgame.drawFuncs, 0, sizeof( clgame.drawFuncs ));
|
||||||
|
|
||||||
|
// fill missing functions from renderer
|
||||||
|
R_FillRenderAPIFromRef( &gRenderAPI, &ref.dllFuncs );
|
||||||
|
|
||||||
|
if( clgame.dllFuncs.pfnGetRenderInterface )
|
||||||
|
{
|
||||||
|
if( clgame.dllFuncs.pfnGetRenderInterface( CL_RENDER_INTERFACE_VERSION, &gRenderAPI, &clgame.drawFuncs ))
|
||||||
|
{
|
||||||
|
Con_Reportf( "CL_LoadProgs: ^2initailized extended RenderAPI ^7ver. %i\n", CL_RENDER_INTERFACE_VERSION );
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// make sure what render functions is cleared
|
||||||
|
memset( &clgame.drawFuncs, 0, sizeof( clgame.drawFuncs ));
|
||||||
|
|
||||||
|
return false; // just tell user about problems
|
||||||
|
}
|
||||||
|
|
||||||
|
// render interface is missed
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -15,20 +15,23 @@ GNU General Public License for more details.
|
|||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "gl_local.h"
|
|
||||||
#include "vgui_draw.h"
|
#include "vgui_draw.h"
|
||||||
#include "qfont.h"
|
#include "qfont.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
#include "library.h"
|
||||||
|
|
||||||
convar_t *scr_centertime;
|
CVAR_DEFINE_AUTO( scr_centertime, "2.5", 0, "centerprint hold time" );
|
||||||
convar_t *scr_loading;
|
CVAR_DEFINE_AUTO( scr_loading, "0", 0, "loading bar progress" );
|
||||||
convar_t *scr_download;
|
CVAR_DEFINE_AUTO( scr_download, "-1", 0, "downloading bar progress" );
|
||||||
convar_t *scr_viewsize;
|
CVAR_DEFINE( scr_viewsize, "viewsize", "120", FCVAR_ARCHIVE, "screen size (quake only)" );
|
||||||
convar_t *cl_testlights;
|
CVAR_DEFINE_AUTO( cl_testlights, "0", 0, "test dynamic lights" );
|
||||||
convar_t *cl_allow_levelshots;
|
CVAR_DEFINE( cl_allow_levelshots, "allow_levelshots", "0", FCVAR_ARCHIVE, "allow engine to use indivdual levelshots instead of 'loading' image" );
|
||||||
convar_t *cl_levelshot_name;
|
CVAR_DEFINE_AUTO( cl_levelshot_name, "*black", 0, "contains path to current levelshot" );
|
||||||
convar_t *cl_envshot_size;
|
static CVAR_DEFINE_AUTO( cl_envshot_size, "256", FCVAR_ARCHIVE, "envshot size of cube side" );
|
||||||
convar_t *v_dark;
|
CVAR_DEFINE_AUTO( v_dark, "0", 0, "starts level from dark screen" );
|
||||||
|
static CVAR_DEFINE_AUTO( net_speeds, "0", FCVAR_ARCHIVE, "show network packets" );
|
||||||
|
static CVAR_DEFINE_AUTO( cl_showfps, "0", FCVAR_ARCHIVE, "show client fps" );
|
||||||
|
static CVAR_DEFINE_AUTO( cl_showpos, "0", FCVAR_ARCHIVE, "show local player position and velocity" );
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@@ -56,7 +59,7 @@ void SCR_DrawFPS( int height )
|
|||||||
char fpsstring[64];
|
char fpsstring[64];
|
||||||
int offset;
|
int offset;
|
||||||
|
|
||||||
if( cls.state != ca_active || !cl_showfps->value || cl.background )
|
if( cls.state != ca_active || !cl_showfps.value || cl.background )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch( cls.scrshot_action )
|
switch( cls.scrshot_action )
|
||||||
@@ -92,14 +95,49 @@ void SCR_DrawFPS( int height )
|
|||||||
if( curfps < minfps ) minfps = curfps;
|
if( curfps < minfps ) minfps = curfps;
|
||||||
if( curfps > maxfps ) maxfps = curfps;
|
if( curfps > maxfps ) maxfps = curfps;
|
||||||
|
|
||||||
if( cl_showfps->value == 2 )
|
if( cl_showfps.value == 2 )
|
||||||
Q_snprintf( fpsstring, sizeof( fpsstring ), "fps: ^1%4i min, ^3%4i cur, ^2%4i max", minfps, curfps, maxfps );
|
Q_snprintf( fpsstring, sizeof( fpsstring ), "fps: ^1%4i min, ^3%4i cur, ^2%4i max", minfps, curfps, maxfps );
|
||||||
else Q_snprintf( fpsstring, sizeof( fpsstring ), "%4i fps", curfps );
|
else Q_snprintf( fpsstring, sizeof( fpsstring ), "%4i fps", curfps );
|
||||||
MakeRGBA( color, 255, 255, 255, 255 );
|
MakeRGBA( color, 255, 255, 255, 255 );
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_DrawStringLen( fpsstring, &offset, NULL );
|
Con_DrawStringLen( fpsstring, &offset, NULL );
|
||||||
Con_DrawString( glState.width - offset - 4, height, fpsstring, color );
|
Con_DrawString( refState.width - offset - 4, height, fpsstring, color );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
==============
|
||||||
|
SCR_DrawPos
|
||||||
|
|
||||||
|
Draw local player position, angles and velocity
|
||||||
|
==============
|
||||||
|
*/
|
||||||
|
void SCR_DrawPos( void )
|
||||||
|
{
|
||||||
|
static char msg[MAX_SYSPATH];
|
||||||
|
float speed;
|
||||||
|
cl_entity_t *ent;
|
||||||
|
rgba_t color;
|
||||||
|
|
||||||
|
if( cls.state != ca_active || !cl_showpos.value || cl.background )
|
||||||
|
return;
|
||||||
|
|
||||||
|
ent = CL_GetLocalPlayer();
|
||||||
|
speed = VectorLength( cl.simvel );
|
||||||
|
|
||||||
|
Q_snprintf( msg, MAX_SYSPATH,
|
||||||
|
"pos: %.2f %.2f %.2f\n"
|
||||||
|
"ang: %.2f %.2f %.2f\n"
|
||||||
|
"velocity: %.2f",
|
||||||
|
cl.simorg[0], cl.simorg[1], cl.simorg[2],
|
||||||
|
// should we use entity angles or viewangles?
|
||||||
|
// view isn't always bound to player
|
||||||
|
ent->angles[0], ent->angles[1], ent->angles[2],
|
||||||
|
speed );
|
||||||
|
|
||||||
|
MakeRGBA( color, 255, 255, 255, 255 );
|
||||||
|
|
||||||
|
Con_DrawString( refState.width / 2, 4, msg, color );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -112,8 +150,7 @@ same as r_speeds but for network channel
|
|||||||
void SCR_NetSpeeds( void )
|
void SCR_NetSpeeds( void )
|
||||||
{
|
{
|
||||||
static char msg[MAX_SYSPATH];
|
static char msg[MAX_SYSPATH];
|
||||||
int x, y, height;
|
int x, y;
|
||||||
char *p, *start, *end;
|
|
||||||
float time = cl.mtime[0];
|
float time = cl.mtime[0];
|
||||||
static int min_svfps = 100;
|
static int min_svfps = 100;
|
||||||
static int max_svfps = 0;
|
static int max_svfps = 0;
|
||||||
@@ -122,11 +159,12 @@ void SCR_NetSpeeds( void )
|
|||||||
static int max_clfps = 0;
|
static int max_clfps = 0;
|
||||||
int cur_clfps = 0;
|
int cur_clfps = 0;
|
||||||
rgba_t color;
|
rgba_t color;
|
||||||
|
cl_font_t *font = Con_GetCurFont();
|
||||||
|
|
||||||
if( !host.allow_console )
|
if( !host.allow_console )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( !net_speeds->value || cls.state != ca_active )
|
if( !net_speeds.value || cls.state != ca_active )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// prevent to get too big values at max
|
// prevent to get too big values at max
|
||||||
@@ -145,28 +183,24 @@ void SCR_NetSpeeds( void )
|
|||||||
if( cur_clfps > max_clfps ) max_clfps = cur_clfps;
|
if( cur_clfps > max_clfps ) max_clfps = cur_clfps;
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_snprintf( msg, sizeof( msg ), "sv fps: ^1%4i min, ^3%4i cur, ^2%4i max\ncl fps: ^1%4i min, ^3%4i cur, ^2%4i max\nGame Time: %02d:%02d\nTotal received from server: %s\nTotal sent to server: %s\n",
|
Q_snprintf( msg, sizeof( msg ),
|
||||||
min_svfps, cur_svfps, max_svfps, min_clfps, cur_clfps, max_clfps, (int)(time / 60.0f ), (int)fmod( time, 60.0f ), Q_memprint( cls.netchan.total_received ), Q_memprint( cls.netchan.total_sended ));
|
"Updaterate: ^1%2i min, ^3%2i cur, ^2%2i max\n"
|
||||||
|
"Client FPS: ^1%i min, ^3%3i cur, ^2%3i max\n"
|
||||||
|
"Game Time: %02d:%02d\n"
|
||||||
|
"Total received from server: %s\n"
|
||||||
|
"Total sent to server: %s\n",
|
||||||
|
min_svfps, cur_svfps, max_svfps,
|
||||||
|
min_clfps, cur_clfps, max_clfps,
|
||||||
|
(int)(time / 60.0f ), (int)fmod( time, 60.0f ),
|
||||||
|
Q_memprint( cls.netchan.total_received ),
|
||||||
|
Q_memprint( cls.netchan.total_sended )
|
||||||
|
);
|
||||||
|
|
||||||
x = glState.width - 320;
|
x = refState.width - 320 * font->scale;
|
||||||
y = 384;
|
y = 384;
|
||||||
|
|
||||||
Con_DrawStringLen( NULL, NULL, &height );
|
|
||||||
MakeRGBA( color, 255, 255, 255, 255 );
|
MakeRGBA( color, 255, 255, 255, 255 );
|
||||||
|
CL_DrawString( x, y, msg, color, font, FONT_DRAW_RESETCOLORONLF );
|
||||||
p = start = msg;
|
|
||||||
|
|
||||||
do
|
|
||||||
{
|
|
||||||
end = Q_strchr( p, '\n' );
|
|
||||||
if( end ) msg[end-start] = '\0';
|
|
||||||
|
|
||||||
Con_DrawString( x, y, p, color );
|
|
||||||
y += height;
|
|
||||||
|
|
||||||
if( end ) p = end + 1;
|
|
||||||
else break;
|
|
||||||
} while( 1 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -181,33 +215,17 @@ void SCR_RSpeeds( void )
|
|||||||
if( !host.allow_console )
|
if( !host.allow_console )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( R_SpeedsMessage( msg, sizeof( msg )))
|
if( ref.dllFuncs.R_SpeedsMessage( msg, sizeof( msg )))
|
||||||
{
|
{
|
||||||
int x, y, height;
|
int x, y;
|
||||||
char *p, *start, *end;
|
|
||||||
rgba_t color;
|
rgba_t color;
|
||||||
|
cl_font_t *font = Con_GetCurFont();
|
||||||
|
|
||||||
x = glState.width - 340;
|
x = refState.width - 340 * font->scale;
|
||||||
y = 64;
|
y = 64;
|
||||||
|
|
||||||
Con_DrawStringLen( NULL, NULL, &height );
|
|
||||||
MakeRGBA( color, 255, 255, 255, 255 );
|
MakeRGBA( color, 255, 255, 255, 255 );
|
||||||
|
CL_DrawString( x, y, msg, color, font, FONT_DRAW_RESETCOLORONLF );
|
||||||
p = start = msg;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
end = Q_strchr( p, '\n' );
|
|
||||||
if( end ) msg[end-start] = '\0';
|
|
||||||
|
|
||||||
Con_DrawString( x, y, p, color );
|
|
||||||
y += height;
|
|
||||||
|
|
||||||
// handle '\n\n'
|
|
||||||
if( *p == '\n' )
|
|
||||||
y += height;
|
|
||||||
if( end ) p = end + 1;
|
|
||||||
else break;
|
|
||||||
} while( 1 );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -227,6 +245,37 @@ void SCR_MakeLevelShot( void )
|
|||||||
Cbuf_AddText( "levelshot\n" );
|
Cbuf_AddText( "levelshot\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
===============
|
||||||
|
VID_WriteOverviewScript
|
||||||
|
|
||||||
|
Create overview script file
|
||||||
|
===============
|
||||||
|
*/
|
||||||
|
static void VID_WriteOverviewScript( void )
|
||||||
|
{
|
||||||
|
ref_overview_t *ov = &clgame.overView;
|
||||||
|
string filename;
|
||||||
|
file_t *f;
|
||||||
|
|
||||||
|
Q_snprintf( filename, sizeof( filename ), "overviews/%s.txt", clgame.mapname );
|
||||||
|
|
||||||
|
f = FS_Open( filename, "w", false );
|
||||||
|
if( !f ) return;
|
||||||
|
|
||||||
|
FS_Printf( f, "// overview description file for %s.bsp\n\n", clgame.mapname );
|
||||||
|
FS_Print( f, "global\n{\n" );
|
||||||
|
FS_Printf( f, "\tZOOM\t%.2f\n", ov->flZoom );
|
||||||
|
FS_Printf( f, "\tORIGIN\t%.2f\t%.2f\t%.2f\n", ov->origin[0], ov->origin[1], ov->origin[2] );
|
||||||
|
FS_Printf( f, "\tROTATED\t%i\n", ov->rotated ? 1 : 0 );
|
||||||
|
FS_Print( f, "}\n\nlayer\n{\n" );
|
||||||
|
FS_Printf( f, "\tIMAGE\t\"overviews/%s.bmp\"\n", clgame.mapname );
|
||||||
|
FS_Printf( f, "\tHEIGHT\t%.2f\n", ov->zFar ); // ???
|
||||||
|
FS_Print( f, "}\n" );
|
||||||
|
|
||||||
|
FS_Close( f );
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
SCR_MakeScreenShot
|
SCR_MakeScreenShot
|
||||||
@@ -239,35 +288,40 @@ void SCR_MakeScreenShot( void )
|
|||||||
qboolean iRet = false;
|
qboolean iRet = false;
|
||||||
int viewsize;
|
int viewsize;
|
||||||
|
|
||||||
|
if( cls.scrshot_action == scrshot_inactive )
|
||||||
|
return;
|
||||||
|
|
||||||
if( cls.envshot_viewsize > 0 )
|
if( cls.envshot_viewsize > 0 )
|
||||||
viewsize = cls.envshot_viewsize;
|
viewsize = cls.envshot_viewsize;
|
||||||
else viewsize = cl_envshot_size->value;
|
else viewsize = cl_envshot_size.value;
|
||||||
|
|
||||||
|
V_CheckGamma();
|
||||||
|
|
||||||
switch( cls.scrshot_action )
|
switch( cls.scrshot_action )
|
||||||
{
|
{
|
||||||
case scrshot_normal:
|
case scrshot_normal:
|
||||||
iRet = VID_ScreenShot( cls.shotname, VID_SCREENSHOT );
|
iRet = ref.dllFuncs.VID_ScreenShot( cls.shotname, VID_SCREENSHOT );
|
||||||
break;
|
break;
|
||||||
case scrshot_snapshot:
|
case scrshot_snapshot:
|
||||||
iRet = VID_ScreenShot( cls.shotname, VID_SNAPSHOT );
|
iRet = ref.dllFuncs.VID_ScreenShot( cls.shotname, VID_SNAPSHOT );
|
||||||
break;
|
break;
|
||||||
case scrshot_plaque:
|
case scrshot_plaque:
|
||||||
iRet = VID_ScreenShot( cls.shotname, VID_LEVELSHOT );
|
iRet = ref.dllFuncs.VID_ScreenShot( cls.shotname, VID_LEVELSHOT );
|
||||||
break;
|
break;
|
||||||
case scrshot_savegame:
|
case scrshot_savegame:
|
||||||
iRet = VID_ScreenShot( cls.shotname, VID_MINISHOT );
|
iRet = ref.dllFuncs.VID_ScreenShot( cls.shotname, VID_MINISHOT );
|
||||||
break;
|
break;
|
||||||
case scrshot_envshot:
|
case scrshot_envshot:
|
||||||
iRet = VID_CubemapShot( cls.shotname, viewsize, cls.envshot_vieworg, false );
|
iRet = ref.dllFuncs.VID_CubemapShot( cls.shotname, viewsize, cls.envshot_vieworg, false );
|
||||||
break;
|
break;
|
||||||
case scrshot_skyshot:
|
case scrshot_skyshot:
|
||||||
iRet = VID_CubemapShot( cls.shotname, viewsize, cls.envshot_vieworg, true );
|
iRet = ref.dllFuncs.VID_CubemapShot( cls.shotname, viewsize, cls.envshot_vieworg, true );
|
||||||
break;
|
break;
|
||||||
case scrshot_mapshot:
|
case scrshot_mapshot:
|
||||||
iRet = VID_ScreenShot( cls.shotname, VID_MAPSHOT );
|
iRet = ref.dllFuncs.VID_ScreenShot( cls.shotname, VID_MAPSHOT );
|
||||||
|
if( iRet )
|
||||||
|
VID_WriteOverviewScript(); // store overview script too
|
||||||
break;
|
break;
|
||||||
case scrshot_inactive:
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// report
|
// report
|
||||||
@@ -291,13 +345,13 @@ void SCR_MakeScreenShot( void )
|
|||||||
SCR_DrawPlaque
|
SCR_DrawPlaque
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void SCR_DrawPlaque( void )
|
static void SCR_DrawPlaque( void )
|
||||||
{
|
{
|
||||||
if(( cl_allow_levelshots->value && !cls.changelevel ) || cl.background )
|
if(( cl_allow_levelshots.value && !cls.changelevel ) || cl.background )
|
||||||
{
|
{
|
||||||
int levelshot = GL_LoadTexture( cl_levelshot_name->string, NULL, 0, TF_IMAGE );
|
int levelshot = ref.dllFuncs.GL_LoadTexture( cl_levelshot_name.string, NULL, 0, TF_IMAGE );
|
||||||
GL_SetRenderMode( kRenderNormal );
|
ref.dllFuncs.GL_SetRenderMode( kRenderNormal );
|
||||||
R_DrawStretchPic( 0, 0, glState.width, glState.height, 0, 0, 1, 1, levelshot );
|
ref.dllFuncs.R_DrawStretchPic( 0, 0, refState.width, refState.height, 0, 0, 1, 1, levelshot );
|
||||||
if( !cl.background ) CL_DrawHUD( CL_LOADING );
|
if( !cl.background ) CL_DrawHUD( CL_LOADING );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -309,17 +363,18 @@ SCR_BeginLoadingPlaque
|
|||||||
*/
|
*/
|
||||||
void SCR_BeginLoadingPlaque( qboolean is_background )
|
void SCR_BeginLoadingPlaque( qboolean is_background )
|
||||||
{
|
{
|
||||||
float oldclear;
|
float oldclear = 0;;
|
||||||
|
|
||||||
S_StopAllSounds( true );
|
S_StopAllSounds( true );
|
||||||
cl.audio_prepped = false; // don't play ambients
|
cl.audio_prepped = false; // don't play ambients
|
||||||
cl.video_prepped = false;
|
cl.video_prepped = false;
|
||||||
oldclear = gl_clear->value;
|
|
||||||
|
if( !Host_IsDedicated() )
|
||||||
|
oldclear = gl_clear.value;
|
||||||
|
|
||||||
if( CL_IsInMenu( ) && !cls.changedemo && !is_background )
|
if( CL_IsInMenu( ) && !cls.changedemo && !is_background )
|
||||||
{
|
{
|
||||||
UI_SetActiveMenu( false );
|
UI_SetActiveMenu( false );
|
||||||
if( cls.state == ca_disconnected )
|
if( cls.state == ca_disconnected && !(GameState->curstate == STATE_RUNFRAME && GameState->nextstate != STATE_RUNFRAME) )
|
||||||
SCR_UpdateScreen();
|
SCR_UpdateScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -329,14 +384,18 @@ void SCR_BeginLoadingPlaque( qboolean is_background )
|
|||||||
if( cls.key_dest == key_console )
|
if( cls.key_dest == key_console )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gl_clear->value = 0.0f;
|
if( !Host_IsDedicated() )
|
||||||
|
gl_clear.value = 0.0f;
|
||||||
|
|
||||||
if( is_background ) IN_MouseSavePos( );
|
if( is_background ) IN_MouseSavePos( );
|
||||||
cls.draw_changelevel = !is_background;
|
cls.draw_changelevel = !is_background;
|
||||||
SCR_UpdateScreen();
|
SCR_UpdateScreen();
|
||||||
cls.disable_screen = host.realtime;
|
cls.disable_screen = host.realtime;
|
||||||
cls.disable_servercount = cl.servercount;
|
|
||||||
cl.background = is_background; // set right state before svc_serverdata is came
|
cl.background = is_background; // set right state before svc_serverdata is came
|
||||||
gl_clear->value = oldclear;
|
|
||||||
|
if( !Host_IsDedicated() )
|
||||||
|
gl_clear.value = oldclear;
|
||||||
|
|
||||||
// SNDDMA_LockSound();
|
// SNDDMA_LockSound();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -357,7 +416,7 @@ void SCR_EndLoadingPlaque( void )
|
|||||||
SCR_AddDirtyPoint
|
SCR_AddDirtyPoint
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void SCR_AddDirtyPoint( int x, int y )
|
static void SCR_AddDirtyPoint( int x, int y )
|
||||||
{
|
{
|
||||||
if( x < scr_dirty.x1 ) scr_dirty.x1 = x;
|
if( x < scr_dirty.x1 ) scr_dirty.x1 = x;
|
||||||
if( x > scr_dirty.x2 ) scr_dirty.x2 = x;
|
if( x > scr_dirty.x2 ) scr_dirty.x2 = x;
|
||||||
@@ -373,7 +432,7 @@ SCR_DirtyScreen
|
|||||||
void SCR_DirtyScreen( void )
|
void SCR_DirtyScreen( void )
|
||||||
{
|
{
|
||||||
SCR_AddDirtyPoint( 0, 0 );
|
SCR_AddDirtyPoint( 0, 0 );
|
||||||
SCR_AddDirtyPoint( glState.width - 1, glState.height - 1 );
|
SCR_AddDirtyPoint( refState.width - 1, refState.height - 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -386,7 +445,7 @@ void SCR_TileClear( void )
|
|||||||
int i, top, bottom, left, right;
|
int i, top, bottom, left, right;
|
||||||
dirty_t clear;
|
dirty_t clear;
|
||||||
|
|
||||||
if( scr_viewsize->value >= 120 )
|
if( scr_viewsize.value >= 120 )
|
||||||
return; // full screen rendering
|
return; // full screen rendering
|
||||||
|
|
||||||
// erase rect will be the union of the past three frames
|
// erase rect will be the union of the past three frames
|
||||||
@@ -425,7 +484,7 @@ void SCR_TileClear( void )
|
|||||||
{
|
{
|
||||||
// clear above view screen
|
// clear above view screen
|
||||||
i = clear.y2 < top-1 ? clear.y2 : top - 1;
|
i = clear.y2 < top-1 ? clear.y2 : top - 1;
|
||||||
R_DrawTileClear( clear.x1, clear.y1, clear.x2 - clear.x1 + 1, i - clear.y1 + 1 );
|
ref.dllFuncs.R_DrawTileClear( cls.tileImage, clear.x1, clear.y1, clear.x2 - clear.x1 + 1, i - clear.y1 + 1 );
|
||||||
clear.y1 = top;
|
clear.y1 = top;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -433,7 +492,7 @@ void SCR_TileClear( void )
|
|||||||
{
|
{
|
||||||
// clear below view screen
|
// clear below view screen
|
||||||
i = clear.y1 > bottom + 1 ? clear.y1 : bottom + 1;
|
i = clear.y1 > bottom + 1 ? clear.y1 : bottom + 1;
|
||||||
R_DrawTileClear( clear.x1, i, clear.x2 - clear.x1 + 1, clear.y2 - i + 1 );
|
ref.dllFuncs.R_DrawTileClear( cls.tileImage, clear.x1, i, clear.x2 - clear.x1 + 1, clear.y2 - i + 1 );
|
||||||
clear.y2 = bottom;
|
clear.y2 = bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -441,7 +500,7 @@ void SCR_TileClear( void )
|
|||||||
{
|
{
|
||||||
// clear left of view screen
|
// clear left of view screen
|
||||||
i = clear.x2 < left - 1 ? clear.x2 : left - 1;
|
i = clear.x2 < left - 1 ? clear.x2 : left - 1;
|
||||||
R_DrawTileClear( clear.x1, clear.y1, i - clear.x1 + 1, clear.y2 - clear.y1 + 1 );
|
ref.dllFuncs.R_DrawTileClear( cls.tileImage, clear.x1, clear.y1, i - clear.x1 + 1, clear.y2 - clear.y1 + 1 );
|
||||||
clear.x1 = left;
|
clear.x1 = left;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -449,7 +508,7 @@ void SCR_TileClear( void )
|
|||||||
{
|
{
|
||||||
// clear left of view screen
|
// clear left of view screen
|
||||||
i = clear.x1 > right + 1 ? clear.x1 : right + 1;
|
i = clear.x1 > right + 1 ? clear.x1 : right + 1;
|
||||||
R_DrawTileClear( i, clear.y1, clear.x2 - i + 1, clear.y2 - clear.y1 + 1 );
|
ref.dllFuncs.R_DrawTileClear( cls.tileImage, i, clear.y1, clear.x2 - i + 1, clear.y2 - clear.y1 + 1 );
|
||||||
clear.x2 = right;
|
clear.x2 = right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -491,77 +550,6 @@ void SCR_UpdateScreen( void )
|
|||||||
V_PostRender();
|
V_PostRender();
|
||||||
}
|
}
|
||||||
|
|
||||||
qboolean SCR_LoadFixedWidthFont( const char *fontname )
|
|
||||||
{
|
|
||||||
int i, fontWidth;
|
|
||||||
|
|
||||||
if( cls.creditsFont.valid )
|
|
||||||
return true; // already loaded
|
|
||||||
|
|
||||||
if( !FS_FileExists( fontname, false ))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
cls.creditsFont.hFontTexture = GL_LoadTexture( fontname, NULL, 0, TF_IMAGE|TF_KEEP_SOURCE );
|
|
||||||
R_GetTextureParms( &fontWidth, NULL, cls.creditsFont.hFontTexture );
|
|
||||||
cls.creditsFont.charHeight = clgame.scrInfo.iCharHeight = fontWidth / 16;
|
|
||||||
cls.creditsFont.type = FONT_FIXED;
|
|
||||||
cls.creditsFont.valid = true;
|
|
||||||
|
|
||||||
// build fixed rectangles
|
|
||||||
for( i = 0; i < 256; i++ )
|
|
||||||
{
|
|
||||||
cls.creditsFont.fontRc[i].left = (i * (fontWidth / 16)) % fontWidth;
|
|
||||||
cls.creditsFont.fontRc[i].right = cls.creditsFont.fontRc[i].left + fontWidth / 16;
|
|
||||||
cls.creditsFont.fontRc[i].top = (i / 16) * (fontWidth / 16);
|
|
||||||
cls.creditsFont.fontRc[i].bottom = cls.creditsFont.fontRc[i].top + fontWidth / 16;
|
|
||||||
cls.creditsFont.charWidths[i] = clgame.scrInfo.charWidths[i] = fontWidth / 16;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
qboolean SCR_LoadVariableWidthFont( const char *fontname )
|
|
||||||
{
|
|
||||||
int i, fontWidth;
|
|
||||||
byte *buffer;
|
|
||||||
size_t length;
|
|
||||||
qfont_t *src;
|
|
||||||
|
|
||||||
if( cls.creditsFont.valid )
|
|
||||||
return true; // already loaded
|
|
||||||
|
|
||||||
if( !FS_FileExists( fontname, false ))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
cls.creditsFont.hFontTexture = GL_LoadTexture( fontname, NULL, 0, TF_IMAGE );
|
|
||||||
R_GetTextureParms( &fontWidth, NULL, cls.creditsFont.hFontTexture );
|
|
||||||
|
|
||||||
// half-life font with variable chars witdh
|
|
||||||
buffer = FS_LoadFile( fontname, &length, false );
|
|
||||||
|
|
||||||
// setup creditsfont
|
|
||||||
if( buffer && length >= sizeof( qfont_t ))
|
|
||||||
{
|
|
||||||
src = (qfont_t *)buffer;
|
|
||||||
cls.creditsFont.charHeight = clgame.scrInfo.iCharHeight = src->rowheight;
|
|
||||||
cls.creditsFont.type = FONT_VARIABLE;
|
|
||||||
|
|
||||||
// build rectangles
|
|
||||||
for( i = 0; i < 256; i++ )
|
|
||||||
{
|
|
||||||
cls.creditsFont.fontRc[i].left = (word)src->fontinfo[i].startoffset % fontWidth;
|
|
||||||
cls.creditsFont.fontRc[i].right = cls.creditsFont.fontRc[i].left + src->fontinfo[i].charwidth;
|
|
||||||
cls.creditsFont.fontRc[i].top = (word)src->fontinfo[i].startoffset / fontWidth;
|
|
||||||
cls.creditsFont.fontRc[i].bottom = cls.creditsFont.fontRc[i].top + src->rowheight;
|
|
||||||
cls.creditsFont.charWidths[i] = clgame.scrInfo.charWidths[i] = src->fontinfo[i].charwidth;
|
|
||||||
}
|
|
||||||
cls.creditsFont.valid = true;
|
|
||||||
}
|
|
||||||
if( buffer ) Mem_Free( buffer );
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
SCR_LoadCreditsFont
|
SCR_LoadCreditsFont
|
||||||
@@ -571,11 +559,41 @@ INTERNAL RESOURCE
|
|||||||
*/
|
*/
|
||||||
void SCR_LoadCreditsFont( void )
|
void SCR_LoadCreditsFont( void )
|
||||||
{
|
{
|
||||||
if( !SCR_LoadVariableWidthFont( "gfx.wad/creditsfont.fnt" ))
|
cl_font_t *const font = &cls.creditsFont;
|
||||||
|
qboolean success = false;
|
||||||
|
float scale = hud_fontscale.value;
|
||||||
|
dword crc = 0;
|
||||||
|
|
||||||
|
// replace default gfx.wad textures by current charset's font
|
||||||
|
if( !CRC32_File( &crc, "gfx.wad" ) || crc == 0x49eb9f16 )
|
||||||
{
|
{
|
||||||
if( !SCR_LoadFixedWidthFont( "gfx/conchars" ))
|
string charsetFnt;
|
||||||
Con_DPrintf( S_ERROR "failed to load HUD font\n" );
|
|
||||||
|
if( Q_snprintf( charsetFnt, sizeof( charsetFnt ),
|
||||||
|
"creditsfont_%s.fnt", Cvar_VariableString( "con_charset" )) > 0 )
|
||||||
|
{
|
||||||
|
if( FS_FileExists( charsetFnt, false ))
|
||||||
|
success = Con_LoadVariableWidthFont( charsetFnt, font, scale, &hud_fontrender, TF_FONT );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( !success )
|
||||||
|
success = Con_LoadVariableWidthFont( "gfx/creditsfont.fnt", font, scale, &hud_fontrender, TF_FONT );
|
||||||
|
|
||||||
|
if( !success )
|
||||||
|
success = Con_LoadFixedWidthFont( "gfx/conchars", font, scale, &hud_fontrender, TF_FONT );
|
||||||
|
|
||||||
|
// copy font size for client.dll
|
||||||
|
if( success )
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
clgame.scrInfo.iCharHeight = cls.creditsFont.charHeight;
|
||||||
|
|
||||||
|
for( i = 0; i < ARRAYSIZE( cls.creditsFont.charWidths ); i++ )
|
||||||
|
clgame.scrInfo.charWidths[i] = cls.creditsFont.charWidths[i];
|
||||||
|
}
|
||||||
|
else Con_DPrintf( S_ERROR "failed to load HUD font\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -585,7 +603,7 @@ SCR_InstallParticlePalette
|
|||||||
INTERNAL RESOURCE
|
INTERNAL RESOURCE
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void SCR_InstallParticlePalette( void )
|
static void SCR_InstallParticlePalette( void )
|
||||||
{
|
{
|
||||||
rgbdata_t *pic;
|
rgbdata_t *pic;
|
||||||
int i;
|
int i;
|
||||||
@@ -631,24 +649,24 @@ void SCR_RegisterTextures( void )
|
|||||||
// register gfx.wad images
|
// register gfx.wad images
|
||||||
|
|
||||||
if( FS_FileExists( "gfx/paused.lmp", false ))
|
if( FS_FileExists( "gfx/paused.lmp", false ))
|
||||||
cls.pauseIcon = GL_LoadTexture( "gfx/paused.lmp", NULL, 0, TF_IMAGE );
|
cls.pauseIcon = ref.dllFuncs.GL_LoadTexture( "gfx/paused.lmp", NULL, 0, TF_IMAGE|TF_ALLOW_NEAREST );
|
||||||
else if( FS_FileExists( "gfx/pause.lmp", false ))
|
else if( FS_FileExists( "gfx/pause.lmp", false ))
|
||||||
cls.pauseIcon = GL_LoadTexture( "gfx/pause.lmp", NULL, 0, TF_IMAGE );
|
cls.pauseIcon = ref.dllFuncs.GL_LoadTexture( "gfx/pause.lmp", NULL, 0, TF_IMAGE|TF_ALLOW_NEAREST );
|
||||||
|
|
||||||
if( FS_FileExists( "gfx/lambda.lmp", false ))
|
if( FS_FileExists( "gfx/lambda.lmp", false ))
|
||||||
{
|
{
|
||||||
if( cl_allow_levelshots->value )
|
if( cl_allow_levelshots.value )
|
||||||
cls.loadingBar = GL_LoadTexture( "gfx/lambda.lmp", NULL, 0, TF_IMAGE|TF_LUMINANCE );
|
cls.loadingBar = ref.dllFuncs.GL_LoadTexture( "gfx/lambda.lmp", NULL, 0, TF_IMAGE|TF_LUMINANCE|TF_ALLOW_NEAREST );
|
||||||
else cls.loadingBar = GL_LoadTexture( "gfx/lambda.lmp", NULL, 0, TF_IMAGE );
|
else cls.loadingBar = ref.dllFuncs.GL_LoadTexture( "gfx/lambda.lmp", NULL, 0, TF_IMAGE|TF_ALLOW_NEAREST );
|
||||||
}
|
}
|
||||||
else if( FS_FileExists( "gfx/loading.lmp", false ))
|
else if( FS_FileExists( "gfx/loading.lmp", false ))
|
||||||
{
|
{
|
||||||
if( cl_allow_levelshots->value )
|
if( cl_allow_levelshots.value )
|
||||||
cls.loadingBar = GL_LoadTexture( "gfx/loading.lmp", NULL, 0, TF_IMAGE|TF_LUMINANCE );
|
cls.loadingBar = ref.dllFuncs.GL_LoadTexture( "gfx/loading.lmp", NULL, 0, TF_IMAGE|TF_LUMINANCE|TF_ALLOW_NEAREST );
|
||||||
else cls.loadingBar = GL_LoadTexture( "gfx/loading.lmp", NULL, 0, TF_IMAGE );
|
else cls.loadingBar = ref.dllFuncs.GL_LoadTexture( "gfx/loading.lmp", NULL, 0, TF_IMAGE|TF_ALLOW_NEAREST );
|
||||||
}
|
}
|
||||||
|
|
||||||
cls.tileImage = GL_LoadTexture( "gfx/backtile.lmp", NULL, 0, TF_NOMIPMAP );
|
cls.tileImage = ref.dllFuncs.GL_LoadTexture( "gfx/backtile.lmp", NULL, 0, TF_NOMIPMAP );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -658,9 +676,9 @@ SCR_SizeUp_f
|
|||||||
Keybinding command
|
Keybinding command
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void SCR_SizeUp_f( void )
|
static void SCR_SizeUp_f( void )
|
||||||
{
|
{
|
||||||
Cvar_SetValue( "viewsize", Q_min( scr_viewsize->value + 10, 120 ));
|
Cvar_SetValue( "viewsize", Q_min( scr_viewsize.value + 10, 120 ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -671,9 +689,9 @@ SCR_SizeDown_f
|
|||||||
Keybinding command
|
Keybinding command
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void SCR_SizeDown_f( void )
|
static void SCR_SizeDown_f( void )
|
||||||
{
|
{
|
||||||
Cvar_SetValue( "viewsize", Q_max( scr_viewsize->value - 10, 30 ));
|
Cvar_SetValue( "viewsize", Q_max( scr_viewsize.value - 10, 30 ));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -683,15 +701,25 @@ SCR_VidInit
|
|||||||
*/
|
*/
|
||||||
void SCR_VidInit( void )
|
void SCR_VidInit( void )
|
||||||
{
|
{
|
||||||
|
if( !ref.initialized ) // don't call VidInit too soon
|
||||||
|
return;
|
||||||
|
|
||||||
memset( &clgame.ds, 0, sizeof( clgame.ds )); // reset a draw state
|
memset( &clgame.ds, 0, sizeof( clgame.ds )); // reset a draw state
|
||||||
memset( &gameui.ds, 0, sizeof( gameui.ds )); // reset a draw state
|
memset( &gameui.ds, 0, sizeof( gameui.ds )); // reset a draw state
|
||||||
memset( &clgame.centerPrint, 0, sizeof( clgame.centerPrint ));
|
memset( &clgame.centerPrint, 0, sizeof( clgame.centerPrint ));
|
||||||
|
|
||||||
// update screen sizes for menu
|
// update screen sizes for menu
|
||||||
gameui.globals->scrWidth = glState.width;
|
if( gameui.globals )
|
||||||
gameui.globals->scrHeight = glState.height;
|
{
|
||||||
|
gameui.globals->scrWidth = refState.width;
|
||||||
|
gameui.globals->scrHeight = refState.height;
|
||||||
|
}
|
||||||
|
|
||||||
VGui_Startup ();
|
// notify vgui about screen size change
|
||||||
|
if( clgame.hInstance )
|
||||||
|
{
|
||||||
|
VGui_Startup( refState.width, refState.height );
|
||||||
|
}
|
||||||
|
|
||||||
CL_ClearSpriteTextures(); // now all hud sprites are invalid
|
CL_ClearSpriteTextures(); // now all hud sprites are invalid
|
||||||
|
|
||||||
@@ -701,6 +729,7 @@ void SCR_VidInit( void )
|
|||||||
|
|
||||||
// restart console size
|
// restart console size
|
||||||
Con_VidInit ();
|
Con_VidInit ();
|
||||||
|
Touch_NotifyResize();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -712,18 +741,20 @@ void SCR_Init( void )
|
|||||||
{
|
{
|
||||||
if( scr_init ) return;
|
if( scr_init ) return;
|
||||||
|
|
||||||
scr_centertime = Cvar_Get( "scr_centertime", "2.5", 0, "centerprint hold time" );
|
Cvar_RegisterVariable( &scr_centertime );
|
||||||
cl_levelshot_name = Cvar_Get( "cl_levelshot_name", "*black", 0, "contains path to current levelshot" );
|
Cvar_RegisterVariable( &cl_levelshot_name );
|
||||||
cl_allow_levelshots = Cvar_Get( "allow_levelshots", "0", FCVAR_ARCHIVE, "allow engine to use indivdual levelshots instead of 'loading' image" );
|
Cvar_RegisterVariable( &cl_allow_levelshots );
|
||||||
scr_loading = Cvar_Get( "scr_loading", "0", 0, "loading bar progress" );
|
Cvar_RegisterVariable( &scr_loading );
|
||||||
scr_download = Cvar_Get( "scr_download", "-1", 0, "downloading bar progress" );
|
Cvar_RegisterVariable( &scr_download );
|
||||||
cl_testlights = Cvar_Get( "cl_testlights", "0", 0, "test dynamic lights" );
|
Cvar_RegisterVariable( &cl_testlights );
|
||||||
cl_envshot_size = Cvar_Get( "cl_envshot_size", "256", FCVAR_ARCHIVE, "envshot size of cube side" );
|
Cvar_RegisterVariable( &cl_envshot_size );
|
||||||
v_dark = Cvar_Get( "v_dark", "0", 0, "starts level from dark screen" );
|
Cvar_RegisterVariable( &v_dark );
|
||||||
scr_viewsize = Cvar_Get( "viewsize", "120", FCVAR_ARCHIVE, "screen size" );
|
Cvar_RegisterVariable( &scr_viewsize );
|
||||||
|
Cvar_RegisterVariable( &net_speeds );
|
||||||
|
Cvar_RegisterVariable( &cl_showfps );
|
||||||
|
Cvar_RegisterVariable( &cl_showpos );
|
||||||
|
|
||||||
// register our commands
|
// register our commands
|
||||||
Cmd_AddCommand( "timerefresh", SCR_TimeRefresh_f, "turn quickly and print rendering statistcs" );
|
|
||||||
Cmd_AddCommand( "skyname", CL_SetSky_f, "set new skybox by basename" );
|
Cmd_AddCommand( "skyname", CL_SetSky_f, "set new skybox by basename" );
|
||||||
Cmd_AddCommand( "loadsky", CL_SetSky_f, "set new skybox by basename" );
|
Cmd_AddCommand( "loadsky", CL_SetSky_f, "set new skybox by basename" );
|
||||||
Cmd_AddCommand( "viewpos", SCR_Viewpos_f, "prints current player origin" );
|
Cmd_AddCommand( "viewpos", SCR_Viewpos_f, "prints current player origin" );
|
||||||
@@ -732,7 +763,7 @@ void SCR_Init( void )
|
|||||||
|
|
||||||
if( !UI_LoadProgs( ))
|
if( !UI_LoadProgs( ))
|
||||||
{
|
{
|
||||||
Con_Printf( S_ERROR "can't initialize gameui.dll\n" ); // there is non fatal for us
|
Con_Printf( S_ERROR "can't initialize gameui DLL: %s\n", COM_GetLibraryError() ); // there is non fatal for us
|
||||||
host.allow_console = true; // we need console, because menu is missing
|
host.allow_console = true; // we need console, because menu is missing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
463
engine/client/cl_securedstub.c
Normal file
463
engine/client/cl_securedstub.c
Normal file
@@ -0,0 +1,463 @@
|
|||||||
|
/*
|
||||||
|
cl_securedstub.c - secured client dll stub
|
||||||
|
Copyright (C) 2022 FWGS
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
|
typedef struct cldll_func_src_s
|
||||||
|
{
|
||||||
|
int (*pfnInitialize)( cl_enginefunc_t *pEnginefuncs, int iVersion );
|
||||||
|
void (*pfnInit)( void );
|
||||||
|
int (*pfnVidInit)( void );
|
||||||
|
int (*pfnRedraw)( float flTime, int intermission );
|
||||||
|
int (*pfnUpdateClientData)( client_data_t *cdata, float flTime );
|
||||||
|
void (*pfnReset)( void );
|
||||||
|
void (*pfnPlayerMove)( struct playermove_s *ppmove, int server );
|
||||||
|
void (*pfnPlayerMoveInit)( struct playermove_s *ppmove );
|
||||||
|
char (*pfnPlayerMoveTexture)( char *name );
|
||||||
|
void (*IN_ActivateMouse)( void );
|
||||||
|
void (*IN_DeactivateMouse)( void );
|
||||||
|
void (*IN_MouseEvent)( int mstate );
|
||||||
|
void (*IN_ClearStates)( void );
|
||||||
|
void (*IN_Accumulate)( void );
|
||||||
|
void (*CL_CreateMove)( float frametime, struct usercmd_s *cmd, int active );
|
||||||
|
int (*CL_IsThirdPerson)( void );
|
||||||
|
void (*CL_CameraOffset)( float *ofs ); // unused
|
||||||
|
void *(*KB_Find)( const char *name );
|
||||||
|
void (*CAM_Think)( void ); // camera stuff
|
||||||
|
void (*pfnCalcRefdef)( ref_params_t *pparams );
|
||||||
|
int (*pfnAddEntity)( int type, cl_entity_t *ent, const char *modelname );
|
||||||
|
void (*pfnCreateEntities)( void );
|
||||||
|
void (*pfnDrawNormalTriangles)( void );
|
||||||
|
void (*pfnDrawTransparentTriangles)( void );
|
||||||
|
void (*pfnStudioEvent)( const struct mstudioevent_s *event, const cl_entity_t *entity );
|
||||||
|
void (*pfnPostRunCmd)( struct local_state_s *from, struct local_state_s *to, usercmd_t *cmd, int runfuncs, double time, unsigned int random_seed );
|
||||||
|
void (*pfnShutdown)( void );
|
||||||
|
void (*pfnTxferLocalOverrides)( entity_state_t *state, const clientdata_t *client );
|
||||||
|
void (*pfnProcessPlayerState)( entity_state_t *dst, const entity_state_t *src );
|
||||||
|
void (*pfnTxferPredictionData)( entity_state_t *ps, const entity_state_t *pps, clientdata_t *pcd, const clientdata_t *ppcd, weapon_data_t *wd, const weapon_data_t *pwd );
|
||||||
|
void (*pfnDemo_ReadBuffer)( int size, byte *buffer );
|
||||||
|
int (*pfnConnectionlessPacket)( const struct netadr_s *net_from, const char *args, char *buffer, int *size );
|
||||||
|
int (*pfnGetHullBounds)( int hullnumber, float *mins, float *maxs );
|
||||||
|
void (*pfnFrame)( double time );
|
||||||
|
int (*pfnKey_Event)( int eventcode, int keynum, const char *pszCurrentBinding );
|
||||||
|
void (*pfnTempEntUpdate)( double frametime, double client_time, double cl_gravity, struct tempent_s **ppTempEntFree, struct tempent_s **ppTempEntActive, int ( *Callback_AddVisibleEntity )( cl_entity_t *pEntity ), void ( *Callback_TempEntPlaySound )( struct tempent_s *pTemp, float damp ));
|
||||||
|
cl_entity_t *(*pfnGetUserEntity)( int index );
|
||||||
|
void (*pfnVoiceStatus)( int entindex, qboolean bTalking );
|
||||||
|
void (*pfnDirectorMessage)( int iSize, void *pbuf );
|
||||||
|
int (*pfnGetStudioModelInterface)( int version, struct r_studio_interface_s **ppinterface, struct engine_studio_api_s *pstudio );
|
||||||
|
void (*pfnChatInputPosition)( int *x, int *y );
|
||||||
|
int (*pfnGetPlayerTeam)( int iPlayer );
|
||||||
|
void *(*pfnClientFactory)( void );
|
||||||
|
} cldll_func_src_t;
|
||||||
|
|
||||||
|
typedef struct cldll_func_dst_s
|
||||||
|
{
|
||||||
|
void (*pfnInitialize)( cl_enginefunc_t **pEnginefuncs, int *iVersion );
|
||||||
|
void (*pfnInit)( void );
|
||||||
|
void (*pfnVidInit)( void );
|
||||||
|
void (*pfnRedraw)( float *flTime, int *intermission );
|
||||||
|
void (*pfnUpdateClientData)( client_data_t **cdata, float *flTime );
|
||||||
|
void (*pfnReset)( void );
|
||||||
|
void (*pfnPlayerMove)( struct playermove_s **ppmove, int *server );
|
||||||
|
void (*pfnPlayerMoveInit)( struct playermove_s **ppmove );
|
||||||
|
void (*pfnPlayerMoveTexture)( char **name );
|
||||||
|
void (*IN_ActivateMouse)( void );
|
||||||
|
void (*IN_DeactivateMouse)( void );
|
||||||
|
void (*IN_MouseEvent)( int *mstate );
|
||||||
|
void (*IN_ClearStates)( void );
|
||||||
|
void (*IN_Accumulate)( void );
|
||||||
|
void (*CL_CreateMove)( float *frametime, struct usercmd_s **cmd, int *active );
|
||||||
|
void (*CL_IsThirdPerson)( void );
|
||||||
|
void (*CL_CameraOffset)( float **ofs );
|
||||||
|
void (*KB_Find)( const char **name );
|
||||||
|
void (*CAM_Think)( void );
|
||||||
|
void (*pfnCalcRefdef)( ref_params_t **pparams );
|
||||||
|
void (*pfnAddEntity)( int *type, cl_entity_t **ent, const char **modelname );
|
||||||
|
void (*pfnCreateEntities)( void );
|
||||||
|
void (*pfnDrawNormalTriangles)( void );
|
||||||
|
void (*pfnDrawTransparentTriangles)( void );
|
||||||
|
void (*pfnStudioEvent)( const struct mstudioevent_s **event, const cl_entity_t **entity );
|
||||||
|
void (*pfnPostRunCmd)( struct local_state_s **from, struct local_state_s **to, usercmd_t **cmd, int *runfuncs, double *time, unsigned int *random_seed );
|
||||||
|
void (*pfnShutdown)( void );
|
||||||
|
void (*pfnTxferLocalOverrides)( entity_state_t **state, const clientdata_t **client );
|
||||||
|
void (*pfnProcessPlayerState)( entity_state_t **dst, const entity_state_t **src );
|
||||||
|
void (*pfnTxferPredictionData)( entity_state_t **ps, const entity_state_t **pps, clientdata_t **pcd, const clientdata_t **ppcd, weapon_data_t **wd, const weapon_data_t **pwd );
|
||||||
|
void (*pfnDemo_ReadBuffer)( int *size, byte **buffer );
|
||||||
|
void (*pfnConnectionlessPacket)( const struct netadr_s **net_from, const char **args, char **buffer, int **size );
|
||||||
|
void (*pfnGetHullBounds)( int *hullnumber, float **mins, float **maxs );
|
||||||
|
void (*pfnFrame)( double *time );
|
||||||
|
void (*pfnKey_Event)( int *eventcode, int *keynum, const char **pszCurrentBinding );
|
||||||
|
void (*pfnTempEntUpdate)( double *frametime, double *client_time, double *cl_gravity, struct tempent_s ***ppTempEntFree, struct tempent_s ***ppTempEntActive, int ( **Callback_AddVisibleEntity )( cl_entity_t *pEntity ), void ( **Callback_TempEntPlaySound )( struct tempent_s *pTemp, float damp ));
|
||||||
|
void (*pfnGetUserEntity)( int *index );
|
||||||
|
void (*pfnVoiceStatus)( int *entindex, qboolean *bTalking );
|
||||||
|
void (*pfnDirectorMessage)( int *iSize, void **pbuf );
|
||||||
|
void (*pfnGetStudioModelInterface)( int *version, struct r_studio_interface_s ***ppinterface, struct engine_studio_api_s **pstudio );
|
||||||
|
void (*pfnChatInputPosition)( int **x, int **y );
|
||||||
|
void (*pfnGetPlayerTeam)( int *iPlayer );
|
||||||
|
} cldll_func_dst_t;
|
||||||
|
|
||||||
|
struct cl_enginefunc_dst_s;
|
||||||
|
struct modshelpers_s;
|
||||||
|
struct modchelpers_s;
|
||||||
|
struct engdata_s;
|
||||||
|
|
||||||
|
typedef struct modfuncs_s
|
||||||
|
{
|
||||||
|
void (*m_pfnLoadMod)( char *pchModule );
|
||||||
|
void (*m_pfnCloseMod)( void );
|
||||||
|
int (*m_pfnNCall)( int ijump, int cnArg, ... );
|
||||||
|
void (*m_pfnGetClDstAddrs)( cldll_func_dst_t *pcldstAddrs );
|
||||||
|
void (*m_pfnGetEngDstAddrs)( struct cl_enginefunc_dst_s *pengdstAddrs );
|
||||||
|
void (*m_pfnModuleLoaded)( void );
|
||||||
|
void (*m_pfnProcessOutgoingNet)( struct netchan_s *pchan, struct sizebuf_s *psizebuf );
|
||||||
|
qboolean (*m_pfnProcessIncomingNet)( struct netchan_s *pchan, struct sizebuf_s *psizebuf );
|
||||||
|
void (*m_pfnTextureLoad)( char *pszName, int dxWidth, int dyHeight, char *pbData );
|
||||||
|
void (*m_pfnModelLoad)( struct model_s *pmodel, void *pvBuf );
|
||||||
|
void (*m_pfnFrameBegin)( void );
|
||||||
|
void (*m_pfnFrameRender1)( void );
|
||||||
|
void (*m_pfnFrameRender2)( void );
|
||||||
|
void (*m_pfnSetModSHelpers)( struct modshelpers_s *pmodshelpers );
|
||||||
|
void (*m_pfnSetModCHelpers)( struct modchelpers_s *pmodchelpers );
|
||||||
|
void (*m_pfnSetEngData)( struct engdata_s *pengdata );
|
||||||
|
int m_nVersion;
|
||||||
|
void (*m_pfnConnectClient)( int iPlayer );
|
||||||
|
void (*m_pfnRecordIP)( unsigned int pnIP );
|
||||||
|
void (*m_pfnPlayerStatus)( unsigned char *pbData, int cbData );
|
||||||
|
void (*m_pfnSetEngineVersion)( int nVersion );
|
||||||
|
int m_nVoid2;
|
||||||
|
int m_nVoid3;
|
||||||
|
int m_nVoid4;
|
||||||
|
int m_nVoid5;
|
||||||
|
int m_nVoid6;
|
||||||
|
int m_nVoid7;
|
||||||
|
int m_nVoid8;
|
||||||
|
int m_nVoid9;
|
||||||
|
} modfuncs_t;
|
||||||
|
|
||||||
|
static void DstInitialize( cl_enginefunc_t **pEnginefuncs, int *iVersion )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstInit( void )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstVidInit( void )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstRedraw( float *flTime, int *intermission )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstUpdateClientData( client_data_t **cdata, float *flTime )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstReset( void )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstPlayerMove( struct playermove_s **ppmove, int *server )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstPlayerMoveInit( struct playermove_s **ppmove )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstPlayerMoveTexture( char **name )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstIN_ActivateMouse( void )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstIN_DeactivateMouse( void )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstIN_MouseEvent( int *mstate )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstIN_ClearStates( void )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstIN_Accumulate( void )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstCL_CreateMove( float *frametime, struct usercmd_s **cmd, int *active )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstCL_IsThirdPerson( void )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstCL_CameraOffset( float **ofs )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstKB_Find( const char **name )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstCAM_Think( void )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstCalcRefdef( ref_params_t **pparams )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstAddEntity( int *type, cl_entity_t **ent, const char **modelname )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstCreateEntities( void )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstDrawNormalTriangles( void )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstDrawTransparentTriangles( void )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstStudioEvent( const struct mstudioevent_s **event, const cl_entity_t **entity )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstPostRunCmd( struct local_state_s **from, struct local_state_s **to, usercmd_t **cmd, int *runfuncs, double *time, unsigned int *random_seed )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstShutdown( void )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstTxferLocalOverrides( entity_state_t **state, const clientdata_t **client )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstProcessPlayerState( entity_state_t **dst, const entity_state_t **src )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstTxferPredictionData( entity_state_t **ps, const entity_state_t **pps, clientdata_t **pcd, const clientdata_t **ppcd, weapon_data_t **wd, const weapon_data_t **pwd )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstDemo_ReadBuffer( int *size, byte **buffer )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstConnectionlessPacket( const struct netadr_s **net_from, const char **args, char **buffer, int **size )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstGetHullBounds( int *hullnumber, float **mins, float **maxs )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstFrame( double *time )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstKey_Event( int *eventcode, int *keynum, const char **pszCurrentBinding )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstTempEntUpdate( double *frametime, double *client_time, double *cl_gravity, struct tempent_s ***ppTempEntFree, struct tempent_s ***ppTempEntActive, int ( **Callback_AddVisibleEntity )( cl_entity_t *pEntity ), void ( **Callback_TempEntPlaySound )( struct tempent_s *pTemp, float damp ) )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstGetUserEntity( int *index )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstVoiceStatus( int *entindex, qboolean *bTalking )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstDirectorMessage( int *iSize, void **pbuf )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstGetStudioModelInterface( int *version, struct r_studio_interface_s ***ppinterface, struct engine_studio_api_s **pstudio )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstChatInputPosition( int **x, int **y )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DstGetPlayerTeam( int *iPlayer )
|
||||||
|
{
|
||||||
|
// stub
|
||||||
|
}
|
||||||
|
|
||||||
|
static cldll_func_dst_t cldllFuncDst =
|
||||||
|
{
|
||||||
|
DstInitialize,
|
||||||
|
DstInit,
|
||||||
|
DstVidInit,
|
||||||
|
DstRedraw,
|
||||||
|
DstUpdateClientData,
|
||||||
|
DstReset,
|
||||||
|
DstPlayerMove,
|
||||||
|
DstPlayerMoveInit,
|
||||||
|
DstPlayerMoveTexture,
|
||||||
|
DstIN_ActivateMouse,
|
||||||
|
DstIN_DeactivateMouse,
|
||||||
|
DstIN_MouseEvent,
|
||||||
|
DstIN_ClearStates,
|
||||||
|
DstIN_Accumulate,
|
||||||
|
DstCL_CreateMove,
|
||||||
|
DstCL_IsThirdPerson,
|
||||||
|
DstCL_CameraOffset,
|
||||||
|
DstKB_Find,
|
||||||
|
DstCAM_Think,
|
||||||
|
DstCalcRefdef,
|
||||||
|
DstAddEntity,
|
||||||
|
DstCreateEntities,
|
||||||
|
DstDrawNormalTriangles,
|
||||||
|
DstDrawTransparentTriangles,
|
||||||
|
DstStudioEvent,
|
||||||
|
DstPostRunCmd,
|
||||||
|
DstShutdown,
|
||||||
|
DstTxferLocalOverrides,
|
||||||
|
DstProcessPlayerState,
|
||||||
|
DstTxferPredictionData,
|
||||||
|
DstDemo_ReadBuffer,
|
||||||
|
DstConnectionlessPacket,
|
||||||
|
DstGetHullBounds,
|
||||||
|
DstFrame,
|
||||||
|
DstKey_Event,
|
||||||
|
DstTempEntUpdate,
|
||||||
|
DstGetUserEntity,
|
||||||
|
DstVoiceStatus,
|
||||||
|
DstDirectorMessage,
|
||||||
|
DstGetStudioModelInterface,
|
||||||
|
DstChatInputPosition,
|
||||||
|
DstGetPlayerTeam,
|
||||||
|
};
|
||||||
|
|
||||||
|
void CL_GetSecuredClientAPI( CL_EXPORT_FUNCS F )
|
||||||
|
{
|
||||||
|
modfuncs_t modFuncs = { 0 };
|
||||||
|
|
||||||
|
// secured client dlls need these
|
||||||
|
cldll_func_src_t cldllFuncSrc =
|
||||||
|
{
|
||||||
|
(void *)&modFuncs,
|
||||||
|
NULL,
|
||||||
|
(void *)&cldllFuncDst
|
||||||
|
};
|
||||||
|
|
||||||
|
// trying to fill interface now
|
||||||
|
F( &cldllFuncSrc );
|
||||||
|
|
||||||
|
// map exports to xash's cldll_func_t
|
||||||
|
clgame.dllFuncs.pfnInitialize = cldllFuncSrc.pfnInitialize;
|
||||||
|
clgame.dllFuncs.pfnInit = cldllFuncSrc.pfnInit;
|
||||||
|
clgame.dllFuncs.pfnVidInit = cldllFuncSrc.pfnVidInit;
|
||||||
|
clgame.dllFuncs.pfnRedraw = cldllFuncSrc.pfnRedraw;
|
||||||
|
clgame.dllFuncs.pfnUpdateClientData = cldllFuncSrc.pfnUpdateClientData;
|
||||||
|
clgame.dllFuncs.pfnReset = cldllFuncSrc.pfnReset;
|
||||||
|
clgame.dllFuncs.pfnPlayerMove = cldllFuncSrc.pfnPlayerMove;
|
||||||
|
clgame.dllFuncs.pfnPlayerMoveInit = cldllFuncSrc.pfnPlayerMoveInit;
|
||||||
|
clgame.dllFuncs.pfnPlayerMoveTexture = cldllFuncSrc.pfnPlayerMoveTexture;
|
||||||
|
clgame.dllFuncs.IN_ActivateMouse = cldllFuncSrc.IN_ActivateMouse;
|
||||||
|
clgame.dllFuncs.IN_DeactivateMouse = cldllFuncSrc.IN_DeactivateMouse;
|
||||||
|
clgame.dllFuncs.IN_MouseEvent = cldllFuncSrc.IN_MouseEvent;
|
||||||
|
clgame.dllFuncs.IN_ClearStates = cldllFuncSrc.IN_ClearStates;
|
||||||
|
clgame.dllFuncs.IN_Accumulate = cldllFuncSrc.IN_Accumulate;
|
||||||
|
clgame.dllFuncs.CL_CreateMove = cldllFuncSrc.CL_CreateMove;
|
||||||
|
clgame.dllFuncs.CL_IsThirdPerson = cldllFuncSrc.CL_IsThirdPerson;
|
||||||
|
clgame.dllFuncs.CL_CameraOffset = cldllFuncSrc.CL_CameraOffset;
|
||||||
|
clgame.dllFuncs.KB_Find = cldllFuncSrc.KB_Find;
|
||||||
|
clgame.dllFuncs.CAM_Think = cldllFuncSrc.CAM_Think;
|
||||||
|
clgame.dllFuncs.pfnCalcRefdef = cldllFuncSrc.pfnCalcRefdef;
|
||||||
|
clgame.dllFuncs.pfnAddEntity = cldllFuncSrc.pfnAddEntity;
|
||||||
|
clgame.dllFuncs.pfnCreateEntities = cldllFuncSrc.pfnCreateEntities;
|
||||||
|
clgame.dllFuncs.pfnDrawNormalTriangles = cldllFuncSrc.pfnDrawNormalTriangles;
|
||||||
|
clgame.dllFuncs.pfnDrawTransparentTriangles = cldllFuncSrc.pfnDrawTransparentTriangles;
|
||||||
|
clgame.dllFuncs.pfnStudioEvent = cldllFuncSrc.pfnStudioEvent;
|
||||||
|
clgame.dllFuncs.pfnPostRunCmd = cldllFuncSrc.pfnPostRunCmd;
|
||||||
|
clgame.dllFuncs.pfnShutdown = cldllFuncSrc.pfnShutdown;
|
||||||
|
clgame.dllFuncs.pfnTxferLocalOverrides = cldllFuncSrc.pfnTxferLocalOverrides;
|
||||||
|
clgame.dllFuncs.pfnProcessPlayerState = cldllFuncSrc.pfnProcessPlayerState;
|
||||||
|
clgame.dllFuncs.pfnTxferPredictionData = cldllFuncSrc.pfnTxferPredictionData;
|
||||||
|
clgame.dllFuncs.pfnDemo_ReadBuffer = cldllFuncSrc.pfnDemo_ReadBuffer;
|
||||||
|
clgame.dllFuncs.pfnConnectionlessPacket = cldllFuncSrc.pfnConnectionlessPacket;
|
||||||
|
clgame.dllFuncs.pfnGetHullBounds = cldllFuncSrc.pfnGetHullBounds;
|
||||||
|
clgame.dllFuncs.pfnFrame = cldllFuncSrc.pfnFrame;
|
||||||
|
clgame.dllFuncs.pfnKey_Event = cldllFuncSrc.pfnKey_Event;
|
||||||
|
clgame.dllFuncs.pfnTempEntUpdate = cldllFuncSrc.pfnTempEntUpdate;
|
||||||
|
clgame.dllFuncs.pfnGetUserEntity = cldllFuncSrc.pfnGetUserEntity;
|
||||||
|
clgame.dllFuncs.pfnVoiceStatus = cldllFuncSrc.pfnVoiceStatus;
|
||||||
|
clgame.dllFuncs.pfnDirectorMessage = cldllFuncSrc.pfnDirectorMessage;
|
||||||
|
clgame.dllFuncs.pfnGetStudioModelInterface = cldllFuncSrc.pfnGetStudioModelInterface;
|
||||||
|
clgame.dllFuncs.pfnChatInputPosition = cldllFuncSrc.pfnChatInputPosition;
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -16,6 +16,8 @@ GNU General Public License for more details.
|
|||||||
#ifndef CL_TENT_H
|
#ifndef CL_TENT_H
|
||||||
#define CL_TENT_H
|
#define CL_TENT_H
|
||||||
|
|
||||||
|
#include "triangleapi.h"
|
||||||
|
|
||||||
// EfxAPI
|
// EfxAPI
|
||||||
struct particle_s *R_AllocParticle( void (*callback)( struct particle_s*, float ));
|
struct particle_s *R_AllocParticle( void (*callback)( struct particle_s*, float ));
|
||||||
void R_Explosion( vec3_t pos, int model, float scale, float framerate, int flags );
|
void R_Explosion( vec3_t pos, int model, float scale, float framerate, int flags );
|
||||||
@@ -79,7 +81,6 @@ void R_DebugParticle( const vec3_t pos, byte r, byte g, byte b );
|
|||||||
void R_RicochetSound( const vec3_t pos );
|
void R_RicochetSound( const vec3_t pos );
|
||||||
struct dlight_s *CL_AllocDlight( int key );
|
struct dlight_s *CL_AllocDlight( int key );
|
||||||
struct dlight_s *CL_AllocElight( int key );
|
struct dlight_s *CL_AllocElight( int key );
|
||||||
void CL_UpdateFlashlight( cl_entity_t *pEnt );
|
|
||||||
void CL_AddEntityEffects( cl_entity_t *ent );
|
void CL_AddEntityEffects( cl_entity_t *ent );
|
||||||
void CL_AddModelEffects( cl_entity_t *ent );
|
void CL_AddModelEffects( cl_entity_t *ent );
|
||||||
void CL_DecalShoot( int textureIndex, int entityIndex, int modelIndex, float *pos, int flags );
|
void CL_DecalShoot( int textureIndex, int entityIndex, int modelIndex, float *pos, int flags );
|
||||||
@@ -87,6 +88,9 @@ void CL_DecalRemoveAll( int textureIndex );
|
|||||||
int CL_DecalIndexFromName( const char *name );
|
int CL_DecalIndexFromName( const char *name );
|
||||||
int CL_DecalIndex( int id );
|
int CL_DecalIndex( int id );
|
||||||
|
|
||||||
|
// RefAPI
|
||||||
|
struct particle_s *CL_AllocParticleFast( void );
|
||||||
|
|
||||||
// Beams
|
// Beams
|
||||||
struct beam_s *R_BeamLightning( vec3_t start, vec3_t end, int modelIndex, float life, float width, float amplitude, float brightness, float speed );
|
struct beam_s *R_BeamLightning( vec3_t start, vec3_t end, int modelIndex, float life, float width, float amplitude, float brightness, float speed );
|
||||||
struct beam_s *R_BeamEnts( int startEnt, int endEnt, int modelIndex, float life, float width, float amplitude, float brightness, float speed, int startFrame, float framerate, float r, float g, float b );
|
struct beam_s *R_BeamEnts( int startEnt, int endEnt, int modelIndex, float life, float width, float amplitude, float brightness, float speed, int startFrame, float framerate, float r, float g, float b );
|
||||||
@@ -99,20 +103,16 @@ void R_BeamKill( int deadEntity );
|
|||||||
|
|
||||||
|
|
||||||
// TriAPI
|
// TriAPI
|
||||||
void TriBegin( int mode );
|
void TriRenderMode( int mode );
|
||||||
void TriTexCoord2f( float u, float v );
|
|
||||||
void TriVertex3fv( const float *v );
|
|
||||||
void TriVertex3f( float x, float y, float z );
|
|
||||||
int TriBoxInPVS( float *mins, float *maxs );
|
|
||||||
void TriColor4f( float r, float g, float b, float a );
|
void TriColor4f( float r, float g, float b, float a );
|
||||||
int TriSpriteTexture( model_t *pSpriteModel, int frame );
|
|
||||||
void TriColor4fRendermode( float r, float g, float b, float a, int rendermode );
|
|
||||||
int TriWorldToScreen( float *world, float *screen );
|
|
||||||
void TriColor4ub( byte r, byte g, byte b, byte a );
|
void TriColor4ub( byte r, byte g, byte b, byte a );
|
||||||
void TriBrightness( float brightness );
|
void TriBrightness( float brightness );
|
||||||
void TriRenderMode( int mode );
|
void TriCullFace( TRICULLSTYLE mode );
|
||||||
void TriCullFace( int mode );
|
int TriWorldToScreen( const float *world, float *screen );
|
||||||
void TriEnd( void );
|
int TriBoxInPVS( float *mins, float *maxs );
|
||||||
|
void TriLightAtPoint( float *pos, float *value );
|
||||||
|
void TriColor4fRendermode( float r, float g, float b, float a, int rendermode );
|
||||||
|
int TriSpriteTexture( model_t *pSpriteModel, int frame );
|
||||||
|
|
||||||
extern model_t *cl_sprite_dot;
|
extern model_t *cl_sprite_dot;
|
||||||
extern model_t *cl_sprite_shell;
|
extern model_t *cl_sprite_shell;
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ GNU General Public License for more details.
|
|||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "gl_local.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=================================================================
|
=================================================================
|
||||||
@@ -25,7 +24,7 @@ AVI PLAYING
|
|||||||
=================================================================
|
=================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static long xres, yres;
|
static int xres, yres;
|
||||||
static float video_duration;
|
static float video_duration;
|
||||||
static float cin_time;
|
static float cin_time;
|
||||||
static int cin_frame;
|
static int cin_frame;
|
||||||
@@ -69,7 +68,7 @@ qboolean SCR_NextMovie( void )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SCR_CreateStartupVids( void )
|
static void SCR_CreateStartupVids( void )
|
||||||
{
|
{
|
||||||
file_t *f;
|
file_t *f;
|
||||||
|
|
||||||
@@ -85,7 +84,8 @@ void SCR_CreateStartupVids( void )
|
|||||||
void SCR_CheckStartupVids( void )
|
void SCR_CheckStartupVids( void )
|
||||||
{
|
{
|
||||||
int c = 0;
|
int c = 0;
|
||||||
char *afile, *pfile;
|
byte *afile;
|
||||||
|
char *pfile;
|
||||||
string token;
|
string token;
|
||||||
|
|
||||||
if( Sys_CheckParm( "-nointro" ) || host_developer.value || cls.demonum != -1 || GameState->nextstate != STATE_RUNFRAME )
|
if( Sys_CheckParm( "-nointro" ) || host_developer.value || cls.demonum != -1 || GameState->nextstate != STATE_RUNFRAME )
|
||||||
@@ -102,9 +102,9 @@ void SCR_CheckStartupVids( void )
|
|||||||
afile = FS_LoadFile( DEFAULT_VIDEOLIST_PATH, NULL, false );
|
afile = FS_LoadFile( DEFAULT_VIDEOLIST_PATH, NULL, false );
|
||||||
if( !afile ) return; // something bad happens
|
if( !afile ) return; // something bad happens
|
||||||
|
|
||||||
pfile = afile;
|
pfile = (char *)afile;
|
||||||
|
|
||||||
while(( pfile = COM_ParseFile( pfile, token )) != NULL )
|
while(( pfile = COM_ParseFile( pfile, token, sizeof( token ))) != NULL )
|
||||||
{
|
{
|
||||||
Q_strncpy( cls.movies[c], token, sizeof( cls.movies[0] ));
|
Q_strncpy( cls.movies[c], token, sizeof( cls.movies[0] ));
|
||||||
|
|
||||||
@@ -180,7 +180,7 @@ qboolean SCR_DrawCinematic( void )
|
|||||||
qboolean redraw = false;
|
qboolean redraw = false;
|
||||||
byte *frame = NULL;
|
byte *frame = NULL;
|
||||||
|
|
||||||
if( !glw_state.initialized || cin_time <= 0.0f )
|
if( !ref.initialized || cin_time <= 0.0f )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( cin_frame != last_frame )
|
if( cin_frame != last_frame )
|
||||||
@@ -190,7 +190,7 @@ qboolean SCR_DrawCinematic( void )
|
|||||||
redraw = true;
|
redraw = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
R_DrawStretchRaw( 0, 0, glState.width, glState.height, xres, yres, frame, redraw );
|
ref.dllFuncs.R_DrawStretchRaw( 0, 0, refState.width, refState.height, xres, yres, frame, redraw );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -202,14 +202,13 @@ SCR_PlayCinematic
|
|||||||
*/
|
*/
|
||||||
qboolean SCR_PlayCinematic( const char *arg )
|
qboolean SCR_PlayCinematic( const char *arg )
|
||||||
{
|
{
|
||||||
string path;
|
|
||||||
const char *fullpath;
|
const char *fullpath;
|
||||||
|
|
||||||
fullpath = FS_GetDiskPath( arg, false );
|
fullpath = FS_GetDiskPath( arg, false );
|
||||||
|
|
||||||
if( FS_FileExists( arg, false ) && !fullpath )
|
if( FS_FileExists( arg, false ) && !fullpath )
|
||||||
{
|
{
|
||||||
Con_Printf( S_ERROR "Couldn't load %s from packfile. Please extract it\n", path );
|
Con_Printf( S_ERROR "Couldn't load %s from packfile. Please extract it\n", arg );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -242,7 +241,7 @@ qboolean SCR_PlayCinematic( const char *arg )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
long SCR_GetAudioChunk( char *rawdata, long length )
|
int SCR_GetAudioChunk( char *rawdata, int length )
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,10 @@ GNU General Public License for more details.
|
|||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "const.h"
|
#include "const.h"
|
||||||
#include "entity_types.h"
|
#include "entity_types.h"
|
||||||
#include "gl_local.h"
|
|
||||||
#include "vgui_draw.h"
|
#include "vgui_draw.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
|
#include "input.h" // touch
|
||||||
|
#include "platform/platform.h" // GL_UpdateSwapInterval
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===============
|
===============
|
||||||
@@ -28,48 +29,57 @@ V_CalcViewRect
|
|||||||
calc frame rectangle (Quake1 style)
|
calc frame rectangle (Quake1 style)
|
||||||
===============
|
===============
|
||||||
*/
|
*/
|
||||||
void V_CalcViewRect( void )
|
static void V_CalcViewRect( void )
|
||||||
{
|
{
|
||||||
qboolean full = false;
|
qboolean full = false;
|
||||||
int sb_lines;
|
int sb_lines;
|
||||||
float size;
|
float size;
|
||||||
|
|
||||||
// intermission is always full screen
|
if( FBitSet( host.features, ENGINE_QUAKE_COMPATIBLE ))
|
||||||
if( cl.intermission ) size = 120.0f;
|
{
|
||||||
else size = scr_viewsize->value;
|
// intermission is always full screen
|
||||||
|
if( cl.intermission ) size = 120.0f;
|
||||||
|
else size = scr_viewsize.value;
|
||||||
|
|
||||||
if( size >= 120.0f )
|
if( size >= 120.0f )
|
||||||
sb_lines = 0; // no status bar at all
|
sb_lines = 0; // no status bar at all
|
||||||
else if( size >= 110.0f )
|
else if( size >= 110.0f )
|
||||||
sb_lines = 24; // no inventory
|
sb_lines = 24; // no inventory
|
||||||
else sb_lines = 48;
|
else sb_lines = 48;
|
||||||
|
|
||||||
if( scr_viewsize->value >= 100.0 )
|
if( scr_viewsize.value >= 100.0f )
|
||||||
|
{
|
||||||
|
full = true;
|
||||||
|
size = 100.0f;
|
||||||
|
}
|
||||||
|
else size = scr_viewsize.value;
|
||||||
|
|
||||||
|
if( cl.intermission )
|
||||||
|
{
|
||||||
|
size = 100.0f;
|
||||||
|
sb_lines = 0;
|
||||||
|
full = true;
|
||||||
|
}
|
||||||
|
size /= 100.0f;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
full = true;
|
full = true;
|
||||||
size = 100.0f;
|
|
||||||
}
|
|
||||||
else size = scr_viewsize->value;
|
|
||||||
|
|
||||||
if( cl.intermission )
|
|
||||||
{
|
|
||||||
size = 100.0f;
|
|
||||||
sb_lines = 0;
|
sb_lines = 0;
|
||||||
full = true;
|
size = 1.0f;
|
||||||
}
|
}
|
||||||
size /= 100.0;
|
|
||||||
|
|
||||||
clgame.viewport[2] = glState.width * size;
|
clgame.viewport[2] = refState.width * size;
|
||||||
clgame.viewport[3] = glState.height * size;
|
clgame.viewport[3] = refState.height * size;
|
||||||
|
|
||||||
if( clgame.viewport[3] > glState.height - sb_lines )
|
if( clgame.viewport[3] > refState.height - sb_lines )
|
||||||
clgame.viewport[3] = glState.height - sb_lines;
|
clgame.viewport[3] = refState.height - sb_lines;
|
||||||
if( clgame.viewport[3] > glState.height )
|
if( clgame.viewport[3] > refState.height )
|
||||||
clgame.viewport[3] = glState.height;
|
clgame.viewport[3] = refState.height;
|
||||||
|
|
||||||
clgame.viewport[0] = ( glState.width - clgame.viewport[2] ) / 2;
|
clgame.viewport[0] = ( refState.width - clgame.viewport[2] ) / 2;
|
||||||
if( full ) clgame.viewport[1] = 0;
|
if( full ) clgame.viewport[1] = 0;
|
||||||
else clgame.viewport[1] = ( glState.height - sb_lines - clgame.viewport[3] ) / 2;
|
else clgame.viewport[1] = ( refState.height - sb_lines - clgame.viewport[3] ) / 2;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,7 +88,7 @@ void V_CalcViewRect( void )
|
|||||||
V_SetupViewModel
|
V_SetupViewModel
|
||||||
===============
|
===============
|
||||||
*/
|
*/
|
||||||
void V_SetupViewModel( void )
|
static void V_SetupViewModel( void )
|
||||||
{
|
{
|
||||||
cl_entity_t *view = &clgame.viewent;
|
cl_entity_t *view = &clgame.viewent;
|
||||||
player_info_t *info = &cl.players[cl.playernum];
|
player_info_t *info = &cl.players[cl.playernum];
|
||||||
@@ -108,13 +118,13 @@ void V_SetupViewModel( void )
|
|||||||
V_SetRefParams
|
V_SetRefParams
|
||||||
===============
|
===============
|
||||||
*/
|
*/
|
||||||
void V_SetRefParams( ref_params_t *fd )
|
static void V_SetRefParams( ref_params_t *fd )
|
||||||
{
|
{
|
||||||
memset( fd, 0, sizeof( ref_params_t ));
|
memset( fd, 0, sizeof( ref_params_t ));
|
||||||
|
|
||||||
// probably this is not needs
|
// probably this is not needs
|
||||||
VectorCopy( RI.vieworg, fd->vieworg );
|
VectorCopy( refState.vieworg, fd->vieworg );
|
||||||
VectorCopy( RI.viewangles, fd->viewangles );
|
VectorCopy( refState.viewangles, fd->viewangles );
|
||||||
|
|
||||||
fd->frametime = host.frametime;
|
fd->frametime = host.frametime;
|
||||||
fd->time = cl.time;
|
fd->time = cl.time;
|
||||||
@@ -134,7 +144,7 @@ void V_SetRefParams( ref_params_t *fd )
|
|||||||
VectorCopy( cl.viewangles, fd->cl_viewangles );
|
VectorCopy( cl.viewangles, fd->cl_viewangles );
|
||||||
fd->health = cl.local.health;
|
fd->health = cl.local.health;
|
||||||
VectorCopy( cl.crosshairangle, fd->crosshairangle );
|
VectorCopy( cl.crosshairangle, fd->crosshairangle );
|
||||||
fd->viewsize = scr_viewsize->value;
|
fd->viewsize = scr_viewsize.value;
|
||||||
|
|
||||||
VectorCopy( cl.punchangle, fd->punchangle );
|
VectorCopy( cl.punchangle, fd->punchangle );
|
||||||
fd->maxclients = cl.maxclients;
|
fd->maxclients = cl.maxclients;
|
||||||
@@ -172,7 +182,7 @@ V_MergeOverviewRefdef
|
|||||||
merge refdef with overview settings
|
merge refdef with overview settings
|
||||||
===============
|
===============
|
||||||
*/
|
*/
|
||||||
void V_RefApplyOverview( ref_viewpass_t *rvp )
|
static void V_RefApplyOverview( ref_viewpass_t *rvp )
|
||||||
{
|
{
|
||||||
ref_overview_t *ov = &clgame.overView;
|
ref_overview_t *ov = &clgame.overView;
|
||||||
float aspect;
|
float aspect;
|
||||||
@@ -183,7 +193,7 @@ void V_RefApplyOverview( ref_viewpass_t *rvp )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// NOTE: Xash3D may use 16:9 or 16:10 aspects
|
// NOTE: Xash3D may use 16:9 or 16:10 aspects
|
||||||
aspect = (float)glState.width / (float)glState.height;
|
aspect = (float)refState.width / (float)refState.height;
|
||||||
|
|
||||||
size_x = fabs( 8192.0f / ov->flZoom );
|
size_x = fabs( 8192.0f / ov->flZoom );
|
||||||
size_y = fabs( 8192.0f / (ov->flZoom * aspect ));
|
size_y = fabs( 8192.0f / (ov->flZoom * aspect ));
|
||||||
@@ -216,7 +226,54 @@ void V_RefApplyOverview( ref_viewpass_t *rvp )
|
|||||||
|
|
||||||
SetBits( rvp->flags, RF_DRAW_OVERVIEW );
|
SetBits( rvp->flags, RF_DRAW_OVERVIEW );
|
||||||
|
|
||||||
Mod_SetOrthoBounds( mins, maxs );
|
ref.dllFuncs.GL_OrthoBounds( mins, maxs );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
====================
|
||||||
|
V_CalcFov
|
||||||
|
====================
|
||||||
|
*/
|
||||||
|
static float V_CalcFov( float *fov_x, float width, float height )
|
||||||
|
{
|
||||||
|
float x, half_fov_y;
|
||||||
|
|
||||||
|
if( *fov_x < 1.0f || *fov_x > 179.0f )
|
||||||
|
*fov_x = 90.0f; // default value
|
||||||
|
|
||||||
|
x = width / tan( DEG2RAD( *fov_x ) * 0.5f );
|
||||||
|
half_fov_y = atan( height / x );
|
||||||
|
|
||||||
|
return RAD2DEG( half_fov_y ) * 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
====================
|
||||||
|
V_AdjustFov
|
||||||
|
====================
|
||||||
|
*/
|
||||||
|
static void V_AdjustFov( float *fov_x, float *fov_y, float width, float height, qboolean lock_x )
|
||||||
|
{
|
||||||
|
float x, y;
|
||||||
|
|
||||||
|
if( width * 3 == 4 * height || width * 4 == height * 5 )
|
||||||
|
{
|
||||||
|
// 4:3 or 5:4 ratio
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( lock_x )
|
||||||
|
{
|
||||||
|
*fov_y = 2 * atan((width * 3) / (height * 4) * tan( *fov_y * M_PI_F / 360.0f * 0.5f )) * 360 / M_PI_F;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
y = V_CalcFov( fov_x, 640, 480 );
|
||||||
|
x = *fov_x;
|
||||||
|
|
||||||
|
*fov_x = V_CalcFov( &y, height, width );
|
||||||
|
if( *fov_x < x ) *fov_x = x;
|
||||||
|
else *fov_y = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -224,7 +281,7 @@ void V_RefApplyOverview( ref_viewpass_t *rvp )
|
|||||||
V_GetRefParams
|
V_GetRefParams
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
void V_GetRefParams( ref_params_t *fd, ref_viewpass_t *rvp )
|
static void V_GetRefParams( ref_params_t *fd, ref_viewpass_t *rvp )
|
||||||
{
|
{
|
||||||
// part1: deniable updates
|
// part1: deniable updates
|
||||||
VectorCopy( fd->simvel, cl.simvel );
|
VectorCopy( fd->simvel, cl.simvel );
|
||||||
@@ -254,7 +311,7 @@ void V_GetRefParams( ref_params_t *fd, ref_viewpass_t *rvp )
|
|||||||
rvp->fov_y = V_CalcFov( &rvp->fov_x, clgame.viewport[2], clgame.viewport[3] );
|
rvp->fov_y = V_CalcFov( &rvp->fov_x, clgame.viewport[2], clgame.viewport[3] );
|
||||||
|
|
||||||
// adjust FOV for widescreen
|
// adjust FOV for widescreen
|
||||||
if( glState.wideScreen && r_adjust_fov->value )
|
if( refState.wideScreen && r_adjust_fov.value )
|
||||||
V_AdjustFov( &rvp->fov_x, &rvp->fov_y, clgame.viewport[2], clgame.viewport[3], false );
|
V_AdjustFov( &rvp->fov_x, &rvp->fov_y, clgame.viewport[2], clgame.viewport[3], false );
|
||||||
|
|
||||||
rvp->flags = 0;
|
rvp->flags = 0;
|
||||||
@@ -273,10 +330,7 @@ V_PreRender
|
|||||||
qboolean V_PreRender( void )
|
qboolean V_PreRender( void )
|
||||||
{
|
{
|
||||||
// too early
|
// too early
|
||||||
if( !glw_state.initialized )
|
if( !ref.initialized )
|
||||||
return false;
|
|
||||||
|
|
||||||
if( host.status == HOST_NOFOCUS )
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( host.status == HOST_SLEEP )
|
if( host.status == HOST_SLEEP )
|
||||||
@@ -285,7 +339,7 @@ qboolean V_PreRender( void )
|
|||||||
// if the screen is disabled (loading plaque is up)
|
// if the screen is disabled (loading plaque is up)
|
||||||
if( cls.disable_screen )
|
if( cls.disable_screen )
|
||||||
{
|
{
|
||||||
if(( host.realtime - cls.disable_screen ) > cl_timeout->value )
|
if(( host.realtime - cls.disable_screen ) > cl_timeout.value )
|
||||||
{
|
{
|
||||||
Con_Reportf( "V_PreRender: loading plaque timed out\n" );
|
Con_Reportf( "V_PreRender: loading plaque timed out\n" );
|
||||||
cls.disable_screen = 0.0f;
|
cls.disable_screen = 0.0f;
|
||||||
@@ -293,7 +347,11 @@ qboolean V_PreRender( void )
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
R_BeginFrame( !cl.paused && ( cls.state == ca_active ));
|
V_CheckGamma();
|
||||||
|
|
||||||
|
ref.dllFuncs.R_BeginFrame( !cl.paused && ( cls.state == ca_active ));
|
||||||
|
|
||||||
|
GL_UpdateSwapInterval( );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -308,19 +366,21 @@ V_RenderView
|
|||||||
*/
|
*/
|
||||||
void V_RenderView( void )
|
void V_RenderView( void )
|
||||||
{
|
{
|
||||||
ref_params_t rp;
|
// HACKHACK: make ref params static
|
||||||
|
// not really critical but allows client.dll to take address of refdef and don't trigger ASan
|
||||||
|
static ref_params_t rp;
|
||||||
ref_viewpass_t rvp;
|
ref_viewpass_t rvp;
|
||||||
int viewnum = 0;
|
int viewnum = 0;
|
||||||
|
|
||||||
if( !cl.video_prepped || ( UI_IsVisible() && !cl.background ))
|
if( !cl.video_prepped || ( !ui_renderworld.value && UI_IsVisible() && !cl.background ))
|
||||||
return; // still loading
|
return; // still loading
|
||||||
|
|
||||||
V_CalcViewRect (); // compute viewport rectangle
|
V_CalcViewRect (); // compute viewport rectangle
|
||||||
V_SetRefParams( &rp );
|
V_SetRefParams( &rp );
|
||||||
V_SetupViewModel ();
|
V_SetupViewModel ();
|
||||||
R_Set2DMode( false );
|
ref.dllFuncs.R_Set2DMode( false );
|
||||||
SCR_DirtyScreen();
|
SCR_DirtyScreen();
|
||||||
GL_BackendStartFrame ();
|
ref.dllFuncs.GL_BackendStartFrame ();
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@@ -330,11 +390,10 @@ void V_RenderView( void )
|
|||||||
|
|
||||||
if( viewnum == 0 && FBitSet( rvp.flags, RF_ONLY_CLIENTDRAW ))
|
if( viewnum == 0 && FBitSet( rvp.flags, RF_ONLY_CLIENTDRAW ))
|
||||||
{
|
{
|
||||||
pglClearColor( 0.0f, 0.0f, 0.0f, 0.0f );
|
ref.dllFuncs.R_ClearScreen();
|
||||||
pglClear( GL_COLOR_BUFFER_BIT );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
R_RenderFrame( &rvp );
|
GL_RenderFrame( &rvp );
|
||||||
S_UpdateFrame( &rvp );
|
S_UpdateFrame( &rvp );
|
||||||
viewnum++;
|
viewnum++;
|
||||||
|
|
||||||
@@ -342,7 +401,101 @@ void V_RenderView( void )
|
|||||||
|
|
||||||
// draw debug triangles on a server
|
// draw debug triangles on a server
|
||||||
SV_DrawDebugTriangles ();
|
SV_DrawDebugTriangles ();
|
||||||
GL_BackendEndFrame ();
|
ref.dllFuncs.GL_BackendEndFrame ();
|
||||||
|
}
|
||||||
|
|
||||||
|
#define POINT_SIZE 16.0f
|
||||||
|
#define NODE_INTERVAL_X(x) (x * 16.0f)
|
||||||
|
#define NODE_INTERVAL_Y(x) (x * 16.0f)
|
||||||
|
|
||||||
|
static void R_DrawLeafNode( float x, float y, float scale )
|
||||||
|
{
|
||||||
|
float downScale = scale * 0.25f;// * POINT_SIZE;
|
||||||
|
|
||||||
|
ref.dllFuncs.R_DrawStretchPic( x - downScale * 0.5f, y - downScale * 0.5f, downScale, downScale, 0, 0, 1, 1, R_GetBuiltinTexture( REF_PARTICLE_TEXTURE ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
static void R_DrawNodeConnection( float x, float y, float x2, float y2 )
|
||||||
|
{
|
||||||
|
ref.dllFuncs.Begin( TRI_LINES );
|
||||||
|
ref.dllFuncs.Vertex3f( x, y, 0 );
|
||||||
|
ref.dllFuncs.Vertex3f( x2, y2, 0 );
|
||||||
|
ref.dllFuncs.End( );
|
||||||
|
}
|
||||||
|
|
||||||
|
static void R_ShowTree_r( mnode_t *node, float x, float y, float scale, int shownodes, mleaf_t *viewleaf )
|
||||||
|
{
|
||||||
|
float downScale = scale * 0.8f;
|
||||||
|
|
||||||
|
downScale = Q_max( downScale, 1.0f );
|
||||||
|
|
||||||
|
if( !node ) return;
|
||||||
|
|
||||||
|
world.recursion_level++;
|
||||||
|
|
||||||
|
if( node->contents < 0 )
|
||||||
|
{
|
||||||
|
mleaf_t *leaf = (mleaf_t *)node;
|
||||||
|
|
||||||
|
if( world.recursion_level > world.max_recursion )
|
||||||
|
world.max_recursion = world.recursion_level;
|
||||||
|
|
||||||
|
if( shownodes == 1 )
|
||||||
|
{
|
||||||
|
if( cl.worldmodel->leafs == leaf )
|
||||||
|
ref.dllFuncs.Color4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||||
|
else if( viewleaf && viewleaf == leaf )
|
||||||
|
ref.dllFuncs.Color4f( 1.0f, 0.0f, 0.0f, 1.0f );
|
||||||
|
else ref.dllFuncs.Color4f( 0.0f, 1.0f, 0.0f, 1.0f );
|
||||||
|
R_DrawLeafNode( x, y, scale );
|
||||||
|
}
|
||||||
|
world.recursion_level--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( shownodes == 1 )
|
||||||
|
{
|
||||||
|
ref.dllFuncs.Color4f( 0.0f, 0.0f, 1.0f, 1.0f );
|
||||||
|
R_DrawLeafNode( x, y, scale );
|
||||||
|
}
|
||||||
|
else if( shownodes == 2 )
|
||||||
|
{
|
||||||
|
R_DrawNodeConnection( x, y, x - scale, y + scale );
|
||||||
|
R_DrawNodeConnection( x, y, x + scale, y + scale );
|
||||||
|
}
|
||||||
|
|
||||||
|
R_ShowTree_r( node->children[1], x - scale, y + scale, downScale, shownodes, viewleaf );
|
||||||
|
R_ShowTree_r( node->children[0], x + scale, y + scale, downScale, shownodes, viewleaf );
|
||||||
|
|
||||||
|
world.recursion_level--;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void R_ShowTree( void )
|
||||||
|
{
|
||||||
|
float x = (float)((refState.width - (int)POINT_SIZE) >> 1);
|
||||||
|
float y = NODE_INTERVAL_Y(1.0f);
|
||||||
|
mleaf_t *viewleaf;
|
||||||
|
|
||||||
|
if( !cl.worldmodel || !r_showtree.value )
|
||||||
|
return;
|
||||||
|
|
||||||
|
world.recursion_level = 0;
|
||||||
|
viewleaf = Mod_PointInLeaf( refState.vieworg, cl.worldmodel->nodes );
|
||||||
|
|
||||||
|
//pglEnable( GL_BLEND );
|
||||||
|
//pglBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
|
||||||
|
//pglTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
|
||||||
|
|
||||||
|
//pglLineWidth( 2.0f );
|
||||||
|
ref.dllFuncs.Color4f( 1, 0.7f, 0, 1.0f );
|
||||||
|
//pglDisable( GL_TEXTURE_2D );
|
||||||
|
R_ShowTree_r( cl.worldmodel->nodes, x, y, world.max_recursion * 3.5f, 2, viewleaf );
|
||||||
|
//pglEnable( GL_TEXTURE_2D );
|
||||||
|
//pglLineWidth( 1.0f );
|
||||||
|
|
||||||
|
R_ShowTree_r( cl.worldmodel->nodes, x, y, world.max_recursion * 3.5f, 1, viewleaf );
|
||||||
|
|
||||||
|
Con_NPrintf( 0, "max recursion %d\n", world.max_recursion );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -356,14 +509,14 @@ void V_PostRender( void )
|
|||||||
static double oldtime;
|
static double oldtime;
|
||||||
qboolean draw_2d = false;
|
qboolean draw_2d = false;
|
||||||
|
|
||||||
R_AllowFog( false );
|
ref.dllFuncs.R_AllowFog( false );
|
||||||
R_Set2DMode( true );
|
ref.dllFuncs.R_Set2DMode( true );
|
||||||
|
|
||||||
if( cls.state == ca_active && cls.signon == SIGNONS && cls.scrshot_action != scrshot_mapshot )
|
if( cls.state == ca_active && cls.signon == SIGNONS && cls.scrshot_action != scrshot_mapshot )
|
||||||
{
|
{
|
||||||
SCR_TileClear();
|
SCR_TileClear();
|
||||||
CL_DrawHUD( CL_ACTIVE );
|
CL_DrawHUD( CL_ACTIVE );
|
||||||
VGui_Paint( true );
|
VGui_Paint();
|
||||||
}
|
}
|
||||||
|
|
||||||
switch( cls.scrshot_action )
|
switch( cls.scrshot_action )
|
||||||
@@ -379,21 +532,27 @@ void V_PostRender( void )
|
|||||||
{
|
{
|
||||||
SCR_RSpeeds();
|
SCR_RSpeeds();
|
||||||
SCR_NetSpeeds();
|
SCR_NetSpeeds();
|
||||||
|
SCR_DrawPos();
|
||||||
SCR_DrawNetGraph();
|
SCR_DrawNetGraph();
|
||||||
SV_DrawOrthoTriangles();
|
SV_DrawOrthoTriangles();
|
||||||
CL_DrawDemoRecording();
|
CL_DrawDemoRecording();
|
||||||
CL_DrawHUD( CL_CHANGELEVEL );
|
CL_DrawHUD( CL_CHANGELEVEL );
|
||||||
R_ShowTextures();
|
ref.dllFuncs.R_ShowTextures();
|
||||||
R_ShowTree();
|
R_ShowTree();
|
||||||
Con_DrawConsole();
|
Con_DrawConsole();
|
||||||
UI_UpdateMenu( host.realtime );
|
UI_UpdateMenu( host.realtime );
|
||||||
Con_DrawVersion();
|
Con_DrawVersion();
|
||||||
Con_DrawDebug(); // must be last
|
Con_DrawDebug(); // must be last
|
||||||
|
Touch_Draw();
|
||||||
|
OSK_Draw();
|
||||||
|
|
||||||
S_ExtraUpdate();
|
S_ExtraUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
SCR_MakeScreenShot();
|
SCR_MakeScreenShot();
|
||||||
R_AllowFog( true );
|
ref.dllFuncs.R_AllowFog( true );
|
||||||
R_EndFrame();
|
Platform_SetTimer( 0.0f );
|
||||||
|
ref.dllFuncs.R_EndFrame();
|
||||||
|
|
||||||
|
V_CheckGammaEnd();
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,8 @@ GNU General Public License for more details.
|
|||||||
#ifndef CLIENT_H
|
#ifndef CLIENT_H
|
||||||
#define CLIENT_H
|
#define CLIENT_H
|
||||||
|
|
||||||
#include "mathlib.h"
|
#include "xash3d_types.h"
|
||||||
|
#include "xash3d_mathlib.h"
|
||||||
#include "cdll_int.h"
|
#include "cdll_int.h"
|
||||||
#include "menu_int.h"
|
#include "menu_int.h"
|
||||||
#include "cl_entity.h"
|
#include "cl_entity.h"
|
||||||
@@ -31,35 +32,14 @@ GNU General Public License for more details.
|
|||||||
#include "netchan.h"
|
#include "netchan.h"
|
||||||
#include "net_api.h"
|
#include "net_api.h"
|
||||||
#include "world.h"
|
#include "world.h"
|
||||||
|
#include "ref_common.h"
|
||||||
#define MAX_DEMOS 32
|
#include "voice.h"
|
||||||
#define MAX_MOVIES 8
|
|
||||||
#define MAX_CDTRACKS 32
|
|
||||||
#define MAX_CLIENT_SPRITES 256 // SpriteTextures
|
|
||||||
#define MAX_EFRAGS 8192 // Arcane Dimensions required
|
|
||||||
#define MAX_REQUESTS 64
|
|
||||||
|
|
||||||
// screenshot types
|
|
||||||
#define VID_SCREENSHOT 0
|
|
||||||
#define VID_LEVELSHOT 1
|
|
||||||
#define VID_MINISHOT 2
|
|
||||||
#define VID_MAPSHOT 3 // special case for overview layer
|
|
||||||
#define VID_SNAPSHOT 4 // save screenshot into root dir and no gamma correction
|
|
||||||
|
|
||||||
// client sprite types
|
// client sprite types
|
||||||
#define SPR_CLIENT 0 // client sprite for temp-entities or user-textures
|
#define SPR_CLIENT 0 // client sprite for temp-entities or user-textures
|
||||||
#define SPR_HUDSPRITE 1 // hud sprite
|
#define SPR_HUDSPRITE 1 // hud sprite
|
||||||
#define SPR_MAPSPRITE 2 // contain overview.bmp that diced into frames 128x128
|
#define SPR_MAPSPRITE 2 // contain overview.bmp that diced into frames 128x128
|
||||||
|
|
||||||
typedef int sound_t;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
DEMO_INACTIVE = 0,
|
|
||||||
DEMO_XASH3D,
|
|
||||||
DEMO_QUAKE1
|
|
||||||
} demo_mode;
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
typedef struct netbandwithgraph_s
|
typedef struct netbandwithgraph_s
|
||||||
{
|
{
|
||||||
@@ -116,7 +96,11 @@ typedef struct
|
|||||||
#define ANGLE_MASK (ANGLE_BACKUP - 1)
|
#define ANGLE_MASK (ANGLE_BACKUP - 1)
|
||||||
|
|
||||||
#define CL_UPDATE_MASK (CL_UPDATE_BACKUP - 1)
|
#define CL_UPDATE_MASK (CL_UPDATE_BACKUP - 1)
|
||||||
|
#if XASH_LOW_MEMORY == 2
|
||||||
|
#define CL_UPDATE_BACKUP SINGLEPLAYER_BACKUP
|
||||||
|
#else
|
||||||
extern int CL_UPDATE_BACKUP;
|
extern int CL_UPDATE_BACKUP;
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SIGNONS 2 // signon messages to receive before connected
|
#define SIGNONS 2 // signon messages to receive before connected
|
||||||
#define INVALID_HANDLE 0xFFFF // for XashXT cache system
|
#define INVALID_HANDLE 0xFFFF // for XashXT cache system
|
||||||
@@ -124,8 +108,7 @@ extern int CL_UPDATE_BACKUP;
|
|||||||
#define MIN_UPDATERATE 10.0f
|
#define MIN_UPDATERATE 10.0f
|
||||||
#define MAX_UPDATERATE 102.0f
|
#define MAX_UPDATERATE 102.0f
|
||||||
|
|
||||||
#define MIN_EX_INTERP 50.0f
|
#define MAX_EX_INTERP 0.1f
|
||||||
#define MAX_EX_INTERP 100.0f
|
|
||||||
|
|
||||||
#define CL_MIN_RESEND_TIME 1.5f // mininum time gap (in seconds) before a subsequent connection request is sent.
|
#define CL_MIN_RESEND_TIME 1.5f // mininum time gap (in seconds) before a subsequent connection request is sent.
|
||||||
#define CL_MAX_RESEND_TIME 20.0f // max time. The cvar cl_resend is bounded by these.
|
#define CL_MAX_RESEND_TIME 20.0f // max time. The cvar cl_resend is bounded by these.
|
||||||
@@ -155,7 +138,7 @@ typedef struct
|
|||||||
int light_level;
|
int light_level;
|
||||||
int waterlevel;
|
int waterlevel;
|
||||||
int usehull;
|
int usehull;
|
||||||
int moving;
|
qboolean moving;
|
||||||
int pushmsec;
|
int pushmsec;
|
||||||
int weapons;
|
int weapons;
|
||||||
float maxspeed;
|
float maxspeed;
|
||||||
@@ -166,13 +149,6 @@ typedef struct
|
|||||||
float weaponstarttime;
|
float weaponstarttime;
|
||||||
} cl_local_data_t;
|
} cl_local_data_t;
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
char name[MAX_OSPATH];
|
|
||||||
char modelname[MAX_OSPATH];
|
|
||||||
model_t *model;
|
|
||||||
} player_model_t;
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
qboolean bUsed;
|
qboolean bUsed;
|
||||||
@@ -198,6 +174,26 @@ typedef struct
|
|||||||
// at every server map change
|
// at every server map change
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
// ==== shared through RefAPI's ref_client_t ====
|
||||||
|
double time; // this is the time value that the client
|
||||||
|
// is rendering at. always <= cls.realtime
|
||||||
|
// a lerp point for other data
|
||||||
|
double oldtime; // previous cl.time, time-oldtime is used
|
||||||
|
// to decay light values and smooth step ups
|
||||||
|
int viewentity;
|
||||||
|
|
||||||
|
// server state information
|
||||||
|
int playernum;
|
||||||
|
int maxclients;
|
||||||
|
|
||||||
|
int nummodels;
|
||||||
|
model_t *models[MAX_MODELS+1]; // precached models (plus sentinel slot)
|
||||||
|
|
||||||
|
qboolean paused;
|
||||||
|
|
||||||
|
vec3_t simorg; // predicted origin
|
||||||
|
// ==== shared through RefAPI's ref_client_t ===
|
||||||
|
|
||||||
int servercount; // server identification for prespawns
|
int servercount; // server identification for prespawns
|
||||||
int validsequence; // this is the sequence number of the last good
|
int validsequence; // this is the sequence number of the last good
|
||||||
// world snapshot/update we got. If this is 0, we can't
|
// world snapshot/update we got. If this is 0, we can't
|
||||||
@@ -207,7 +203,6 @@ typedef struct
|
|||||||
|
|
||||||
qboolean video_prepped; // false if on new level or new ref dll
|
qboolean video_prepped; // false if on new level or new ref dll
|
||||||
qboolean audio_prepped; // false if on new level or new snd dll
|
qboolean audio_prepped; // false if on new level or new snd dll
|
||||||
qboolean paused;
|
|
||||||
|
|
||||||
int delta_sequence; // acknowledged sequence number
|
int delta_sequence; // acknowledged sequence number
|
||||||
|
|
||||||
@@ -229,15 +224,9 @@ typedef struct
|
|||||||
runcmd_t commands[MULTIPLAYER_BACKUP]; // each mesage will send several old cmds
|
runcmd_t commands[MULTIPLAYER_BACKUP]; // each mesage will send several old cmds
|
||||||
local_state_t predicted_frames[MULTIPLAYER_BACKUP]; // local client state
|
local_state_t predicted_frames[MULTIPLAYER_BACKUP]; // local client state
|
||||||
|
|
||||||
double time; // this is the time value that the client
|
double timedelta; // floating delta between two updates
|
||||||
// is rendering at. always <= cls.realtime
|
|
||||||
// a lerp point for other data
|
|
||||||
double oldtime; // previous cl.time, time-oldtime is used
|
|
||||||
// to decay light values and smooth step ups
|
|
||||||
float timedelta; // floating delta between two updates
|
|
||||||
|
|
||||||
char serverinfo[MAX_SERVERINFO_STRING];
|
char serverinfo[MAX_SERVERINFO_STRING];
|
||||||
player_model_t player_models[MAX_CLIENTS]; // cache of player models
|
|
||||||
player_info_t players[MAX_CLIENTS]; // collected info about all other players include himself
|
player_info_t players[MAX_CLIENTS]; // collected info about all other players include himself
|
||||||
double lastresourcecheck;
|
double lastresourcecheck;
|
||||||
string downloadUrl;
|
string downloadUrl;
|
||||||
@@ -248,7 +237,6 @@ typedef struct
|
|||||||
|
|
||||||
// player final info
|
// player final info
|
||||||
usercmd_t *cmd; // cl.commands[outgoing_sequence].cmd
|
usercmd_t *cmd; // cl.commands[outgoing_sequence].cmd
|
||||||
int viewentity;
|
|
||||||
vec3_t viewangles;
|
vec3_t viewangles;
|
||||||
vec3_t viewheight;
|
vec3_t viewheight;
|
||||||
vec3_t punchangle;
|
vec3_t punchangle;
|
||||||
@@ -261,14 +249,9 @@ typedef struct
|
|||||||
float addangletotal;
|
float addangletotal;
|
||||||
float prevaddangletotal;
|
float prevaddangletotal;
|
||||||
|
|
||||||
// predicted origin and velocity
|
// predicted velocity
|
||||||
vec3_t simorg;
|
|
||||||
vec3_t simvel;
|
vec3_t simvel;
|
||||||
|
|
||||||
// server state information
|
|
||||||
int playernum;
|
|
||||||
int maxclients;
|
|
||||||
|
|
||||||
entity_state_t instanced_baseline[MAX_CUSTOM_BASELINES];
|
entity_state_t instanced_baseline[MAX_CUSTOM_BASELINES];
|
||||||
int instanced_baseline_count;
|
int instanced_baseline_count;
|
||||||
|
|
||||||
@@ -276,8 +259,6 @@ typedef struct
|
|||||||
char event_precache[MAX_EVENTS][MAX_QPATH];
|
char event_precache[MAX_EVENTS][MAX_QPATH];
|
||||||
char files_precache[MAX_CUSTOM][MAX_QPATH];
|
char files_precache[MAX_CUSTOM][MAX_QPATH];
|
||||||
lightstyle_t lightstyles[MAX_LIGHTSTYLES];
|
lightstyle_t lightstyles[MAX_LIGHTSTYLES];
|
||||||
model_t *models[MAX_MODELS+1]; // precached models (plus sentinel slot)
|
|
||||||
int nummodels;
|
|
||||||
int numfiles;
|
int numfiles;
|
||||||
|
|
||||||
consistency_t consistency_list[MAX_MODELS];
|
consistency_t consistency_list[MAX_MODELS];
|
||||||
@@ -293,6 +274,8 @@ typedef struct
|
|||||||
short decal_index[MAX_DECALS];
|
short decal_index[MAX_DECALS];
|
||||||
|
|
||||||
model_t *worldmodel; // pointer to world
|
model_t *worldmodel; // pointer to world
|
||||||
|
|
||||||
|
int lostpackets; // count lost packets and show dialog in menu
|
||||||
} client_t;
|
} client_t;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -303,16 +286,6 @@ of server connections
|
|||||||
|
|
||||||
==================================================================
|
==================================================================
|
||||||
*/
|
*/
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
ca_disconnected = 0,// not talking to a server
|
|
||||||
ca_connecting, // sending request packets to the server
|
|
||||||
ca_connected, // netchan_t established, waiting for svc_serverdata
|
|
||||||
ca_validate, // download resources, validating, auth on server
|
|
||||||
ca_active, // game views should be displayed
|
|
||||||
ca_cinematic, // playing a cinematic, not connected to a server
|
|
||||||
} connstate_t;
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
scrshot_inactive,
|
scrshot_inactive,
|
||||||
@@ -351,34 +324,47 @@ typedef struct
|
|||||||
pfnEventHook func; // user-defined function
|
pfnEventHook func; // user-defined function
|
||||||
} cl_user_event_t;
|
} cl_user_event_t;
|
||||||
|
|
||||||
#define FONT_FIXED 0
|
#define FONT_FIXED 0
|
||||||
#define FONT_VARIABLE 1
|
#define FONT_VARIABLE 1
|
||||||
|
|
||||||
|
#define FONT_DRAW_HUD BIT( 0 ) // pass to drawing function to apply hud_scale
|
||||||
|
#define FONT_DRAW_UTF8 BIT( 1 ) // call UtfProcessChar
|
||||||
|
#define FONT_DRAW_FORCECOL BIT( 2 ) // ignore colorcodes
|
||||||
|
#define FONT_DRAW_NORENDERMODE BIT( 3 ) // ignore font's default rendermode
|
||||||
|
#define FONT_DRAW_NOLF BIT( 4 ) // ignore \n
|
||||||
|
#define FONT_DRAW_RESETCOLORONLF BIT( 5 ) // yet another flag to simulate consecutive Con_DrawString calls...
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int hFontTexture; // handle to texture
|
int hFontTexture; // handle to texture
|
||||||
wrect_t fontRc[256]; // rectangles
|
wrect_t fontRc[256]; // tex coords
|
||||||
byte charWidths[256];
|
float scale; // scale factor
|
||||||
int charHeight;
|
byte charWidths[256]; // scaled widths
|
||||||
int type;
|
int charHeight; // scaled height
|
||||||
qboolean valid; // all rectangles are valid
|
int type; // fixed width font or variable
|
||||||
|
convar_t *rendermode; // user-defined default rendermode
|
||||||
|
qboolean valid; // all rectangles are valid
|
||||||
} cl_font_t;
|
} cl_font_t;
|
||||||
|
|
||||||
|
typedef struct scissor_state_s
|
||||||
|
{
|
||||||
|
int x;
|
||||||
|
int y;
|
||||||
|
int width;
|
||||||
|
int height;
|
||||||
|
qboolean test;
|
||||||
|
} scissor_state_t;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
// scissor test
|
||||||
|
scissor_state_t scissor;
|
||||||
|
|
||||||
// temp handle
|
// temp handle
|
||||||
const model_t *pSprite; // pointer to current SpriteTexture
|
const model_t *pSprite; // pointer to current SpriteTexture
|
||||||
|
|
||||||
// scissor test
|
|
||||||
int scissor_x;
|
|
||||||
int scissor_y;
|
|
||||||
int scissor_width;
|
|
||||||
int scissor_height;
|
|
||||||
qboolean scissor_test;
|
|
||||||
qboolean adjust_size; // allow to adjust scale for fonts
|
|
||||||
|
|
||||||
int renderMode; // override kRenderMode from TriAPI
|
int renderMode; // override kRenderMode from TriAPI
|
||||||
int cullMode; // override CULL FACE from TriAPI
|
TRICULLSTYLE cullMode; // override CULL FACE from TriAPI
|
||||||
|
|
||||||
// holds text color
|
// holds text color
|
||||||
rgba_t textColor;
|
rgba_t textColor;
|
||||||
@@ -403,14 +389,10 @@ typedef struct cl_predicted_player_s
|
|||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int gl_texturenum; // this is a real texnum
|
|
||||||
|
|
||||||
// scissor test
|
// scissor test
|
||||||
int scissor_x;
|
scissor_state_t scissor;
|
||||||
int scissor_y;
|
|
||||||
int scissor_width;
|
int gl_texturenum; // this is a real texnum
|
||||||
int scissor_height;
|
|
||||||
qboolean scissor_test;
|
|
||||||
|
|
||||||
// holds text color
|
// holds text color
|
||||||
rgba_t textColor;
|
rgba_t textColor;
|
||||||
@@ -446,23 +428,6 @@ typedef struct
|
|||||||
float applied_angle;
|
float applied_angle;
|
||||||
} screen_shake_t;
|
} screen_shake_t;
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
unsigned short textures[MAX_SKINS];// alias textures
|
|
||||||
struct mstudiotex_s *ptexture; // array of textures with local copy of remapped textures
|
|
||||||
short numtextures; // textures count
|
|
||||||
short topcolor; // cached value
|
|
||||||
short bottomcolor; // cached value
|
|
||||||
model_t *model; // for catch model changes
|
|
||||||
} remap_info_t;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
NET_REQUEST_CANCEL = 0, // request was cancelled for some reasons
|
|
||||||
NET_REQUEST_GAMEUI, // called from GameUI
|
|
||||||
NET_REQUEST_CLIENT, // called from Client
|
|
||||||
} net_request_type_t;
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
net_response_t resp;
|
net_response_t resp;
|
||||||
@@ -480,7 +445,7 @@ typedef struct
|
|||||||
void *hInstance; // pointer to client.dll
|
void *hInstance; // pointer to client.dll
|
||||||
cldll_func_t dllFuncs; // dll exported funcs
|
cldll_func_t dllFuncs; // dll exported funcs
|
||||||
render_interface_t drawFuncs; // custom renderer support
|
render_interface_t drawFuncs; // custom renderer support
|
||||||
byte *mempool; // client edicts pool
|
poolhandle_t mempool; // client edicts pool
|
||||||
string mapname; // map name
|
string mapname; // map name
|
||||||
string maptitle; // display map title
|
string maptitle; // display map title
|
||||||
string itemspath; // path to items description for auto-complete func
|
string itemspath; // path to items description for auto-complete func
|
||||||
@@ -508,7 +473,7 @@ typedef struct
|
|||||||
|
|
||||||
string cdtracks[MAX_CDTRACKS]; // 32 cd-tracks read from cdaudio.txt
|
string cdtracks[MAX_CDTRACKS]; // 32 cd-tracks read from cdaudio.txt
|
||||||
|
|
||||||
model_t sprites[MAX_CLIENT_SPRITES]; // client spritetextures
|
model_t sprites[MAX_CLIENT_SPRITES]; // hud&client spritetexturesz
|
||||||
int viewport[4]; // viewport sizes
|
int viewport[4]; // viewport sizes
|
||||||
|
|
||||||
client_draw_t ds; // draw2d stuff (hud, weaponmenu etc)
|
client_draw_t ds; // draw2d stuff (hud, weaponmenu etc)
|
||||||
@@ -524,19 +489,20 @@ typedef struct
|
|||||||
client_textmessage_t *titles; // title messages, not network messages
|
client_textmessage_t *titles; // title messages, not network messages
|
||||||
int numTitles;
|
int numTitles;
|
||||||
|
|
||||||
net_request_type_t request_type; // filter the requests
|
|
||||||
net_request_t net_requests[MAX_REQUESTS]; // no reason to keep more
|
net_request_t net_requests[MAX_REQUESTS]; // no reason to keep more
|
||||||
net_request_t *master_request; // queued master request
|
|
||||||
|
|
||||||
efrag_t *free_efrags; // linked efrags
|
efrag_t *free_efrags; // linked efrags
|
||||||
cl_entity_t viewent; // viewmodel
|
cl_entity_t viewent; // viewmodel
|
||||||
|
|
||||||
|
qboolean client_dll_uses_sdl;
|
||||||
} clgame_static_t;
|
} clgame_static_t;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
void *hInstance; // pointer to client.dll
|
void *hInstance; // pointer to client.dll
|
||||||
UI_FUNCTIONS dllFuncs; // dll exported funcs
|
UI_FUNCTIONS dllFuncs; // dll exported funcs
|
||||||
byte *mempool; // client edicts pool
|
UI_EXTENDED_FUNCTIONS dllFuncs2; // fwgs extension
|
||||||
|
poolhandle_t mempool; // client edicts pool
|
||||||
|
|
||||||
cl_entity_t playermodel; // uiPlayerSetup drawing model
|
cl_entity_t playermodel; // uiPlayerSetup drawing model
|
||||||
player_info_t playerinfo; // local playerinfo
|
player_info_t playerinfo; // local playerinfo
|
||||||
@@ -548,9 +514,11 @@ typedef struct
|
|||||||
ui_globalvars_t *globals;
|
ui_globalvars_t *globals;
|
||||||
|
|
||||||
qboolean drawLogo; // set to TRUE if logo.avi missed or corrupted
|
qboolean drawLogo; // set to TRUE if logo.avi missed or corrupted
|
||||||
long logo_xres;
|
int logo_xres;
|
||||||
long logo_yres;
|
int logo_yres;
|
||||||
float logo_length;
|
float logo_length;
|
||||||
|
|
||||||
|
qboolean use_text_api;
|
||||||
} gameui_static_t;
|
} gameui_static_t;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
@@ -565,14 +533,11 @@ typedef struct
|
|||||||
float disable_screen; // showing loading plaque between levels
|
float disable_screen; // showing loading plaque between levels
|
||||||
// or changing rendering dlls
|
// or changing rendering dlls
|
||||||
// if time gets > 30 seconds ahead, break it
|
// if time gets > 30 seconds ahead, break it
|
||||||
int disable_servercount; // when we receive a frame and cl.servercount
|
|
||||||
// > cls.disable_servercount, clear disable_screen
|
|
||||||
|
|
||||||
qboolean draw_changelevel; // draw changelevel image 'Loading...'
|
qboolean draw_changelevel; // draw changelevel image 'Loading...'
|
||||||
|
|
||||||
keydest_t key_dest;
|
keydest_t key_dest;
|
||||||
|
|
||||||
byte *mempool; // client premamnent pool: edicts etc
|
poolhandle_t mempool; // client premamnent pool: edicts etc
|
||||||
|
|
||||||
netadr_t hltv_listen_address;
|
netadr_t hltv_listen_address;
|
||||||
|
|
||||||
@@ -648,7 +613,7 @@ typedef struct
|
|||||||
|
|
||||||
// demo recording info must be here, so it isn't clearing on level change
|
// demo recording info must be here, so it isn't clearing on level change
|
||||||
qboolean demorecording;
|
qboolean demorecording;
|
||||||
qboolean demoplayback;
|
int demoplayback;
|
||||||
qboolean demowaiting; // don't record until a non-delta message is received
|
qboolean demowaiting; // don't record until a non-delta message is received
|
||||||
qboolean timedemo;
|
qboolean timedemo;
|
||||||
string demoname; // for demo looping
|
string demoname; // for demo looping
|
||||||
@@ -657,6 +622,18 @@ typedef struct
|
|||||||
|
|
||||||
file_t *demofile;
|
file_t *demofile;
|
||||||
file_t *demoheader; // contain demo startup info in case we record a demo on this level
|
file_t *demoheader; // contain demo startup info in case we record a demo on this level
|
||||||
|
qboolean internetservers_wait; // internetservers is waiting for dns request
|
||||||
|
qboolean internetservers_pending; // if true, clean master server pings
|
||||||
|
uint32_t internetservers_key; // compare key to validate master server reply
|
||||||
|
char internetservers_query[512]; // cached query
|
||||||
|
uint32_t internetservers_query_len;
|
||||||
|
|
||||||
|
// legacy mode support
|
||||||
|
qboolean legacymode; // one-way 48 protocol compatibility
|
||||||
|
netadr_t legacyserver;
|
||||||
|
int extensions;
|
||||||
|
|
||||||
|
netadr_t serveradr;
|
||||||
} client_static_t;
|
} client_static_t;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@@ -681,46 +658,58 @@ extern convar_t cl_logocolor;
|
|||||||
extern convar_t cl_allow_download;
|
extern convar_t cl_allow_download;
|
||||||
extern convar_t cl_allow_upload;
|
extern convar_t cl_allow_upload;
|
||||||
extern convar_t cl_download_ingame;
|
extern convar_t cl_download_ingame;
|
||||||
extern convar_t *cl_nopred;
|
extern convar_t cl_nopred;
|
||||||
extern convar_t *cl_showfps;
|
extern convar_t cl_timeout;
|
||||||
extern convar_t *cl_envshot_size;
|
extern convar_t cl_nodelta;
|
||||||
extern convar_t *cl_timeout;
|
extern convar_t cl_interp;
|
||||||
extern convar_t *cl_nodelta;
|
extern convar_t cl_nointerp;
|
||||||
extern convar_t *cl_interp;
|
extern convar_t cl_showerror;
|
||||||
extern convar_t *cl_showerror;
|
extern convar_t cl_nosmooth;
|
||||||
extern convar_t *cl_nosmooth;
|
extern convar_t cl_smoothtime;
|
||||||
extern convar_t *cl_smoothtime;
|
extern convar_t cl_crosshair;
|
||||||
extern convar_t *cl_crosshair;
|
extern convar_t cl_testlights;
|
||||||
extern convar_t *cl_testlights;
|
extern convar_t cl_cmdrate;
|
||||||
extern convar_t *cl_cmdrate;
|
extern convar_t cl_updaterate;
|
||||||
extern convar_t *cl_updaterate;
|
extern convar_t cl_solid_players;
|
||||||
extern convar_t *cl_solid_players;
|
extern convar_t cl_idealpitchscale;
|
||||||
extern convar_t *cl_idealpitchscale;
|
extern convar_t cl_allow_levelshots;
|
||||||
extern convar_t *cl_allow_levelshots;
|
extern convar_t cl_lightstyle_lerping;
|
||||||
extern convar_t *cl_lightstyle_lerping;
|
extern convar_t cl_draw_particles;
|
||||||
extern convar_t *cl_draw_particles;
|
extern convar_t cl_draw_tracers;
|
||||||
extern convar_t *cl_draw_tracers;
|
extern convar_t cl_levelshot_name;
|
||||||
extern convar_t *cl_levelshot_name;
|
extern convar_t cl_draw_beams;
|
||||||
extern convar_t *cl_draw_beams;
|
extern convar_t cl_clockreset;
|
||||||
extern convar_t *cl_clockreset;
|
extern convar_t cl_fixtimerate;
|
||||||
extern convar_t *cl_fixtimerate;
|
extern convar_t hud_fontscale;
|
||||||
extern convar_t *gl_showtextures;
|
extern convar_t hud_fontrender;
|
||||||
extern convar_t *cl_bmodelinterp;
|
extern convar_t hud_scale;
|
||||||
extern convar_t *cl_righthand;
|
extern convar_t hud_scale_minimal_width;
|
||||||
extern convar_t *cl_lw; // local weapons
|
extern convar_t r_showtextures;
|
||||||
extern convar_t *cl_showevents;
|
extern convar_t cl_bmodelinterp;
|
||||||
extern convar_t *scr_centertime;
|
extern convar_t cl_lw; // local weapons
|
||||||
extern convar_t *scr_viewsize;
|
extern convar_t cl_charset;
|
||||||
extern convar_t *scr_loading;
|
extern convar_t cl_trace_stufftext;
|
||||||
extern convar_t *v_dark; // start from dark
|
extern convar_t cl_trace_messages;
|
||||||
extern convar_t *net_graph;
|
extern convar_t cl_trace_events;
|
||||||
extern convar_t *rate;
|
extern convar_t hud_utf8;
|
||||||
|
extern convar_t cl_showevents;
|
||||||
|
extern convar_t scr_centertime;
|
||||||
|
extern convar_t scr_viewsize;
|
||||||
|
extern convar_t scr_loading;
|
||||||
|
extern convar_t v_dark; // start from dark
|
||||||
|
extern convar_t net_graph;
|
||||||
|
extern convar_t rate;
|
||||||
|
extern convar_t m_ignore;
|
||||||
|
extern convar_t r_showtree;
|
||||||
|
extern convar_t ui_renderworld;
|
||||||
|
extern convar_t cl_fixmodelinterpolationartifacts;
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
void CL_SetLightstyle( int style, const char* s, float f );
|
void CL_SetLightstyle( int style, const char* s, float f );
|
||||||
void CL_RunLightStyles( void );
|
|
||||||
void CL_DecayLights( void );
|
void CL_DecayLights( void );
|
||||||
|
dlight_t *CL_GetDynamicLight( int number );
|
||||||
|
dlight_t *CL_GetEntityLight( int number );
|
||||||
|
|
||||||
//=================================================
|
//=================================================
|
||||||
|
|
||||||
@@ -728,16 +717,12 @@ void CL_DecayLights( void );
|
|||||||
// cl_cmds.c
|
// cl_cmds.c
|
||||||
//
|
//
|
||||||
void CL_Quit_f( void );
|
void CL_Quit_f( void );
|
||||||
void CL_ScreenShot_f( void );
|
void CL_GenericShot_f( void );
|
||||||
void CL_SnapShot_f( void );
|
|
||||||
void CL_PlayCDTrack_f( void );
|
void CL_PlayCDTrack_f( void );
|
||||||
void CL_EnvShot_f( void );
|
|
||||||
void CL_SkyShot_f( void );
|
|
||||||
void CL_SaveShot_f( void );
|
|
||||||
void CL_LevelShot_f( void );
|
void CL_LevelShot_f( void );
|
||||||
void CL_SetSky_f( void );
|
void CL_SetSky_f( void );
|
||||||
void SCR_Viewpos_f( void );
|
void SCR_Viewpos_f( void );
|
||||||
void SCR_TimeRefresh_f( void );
|
void CL_WavePlayLen_f( void );
|
||||||
|
|
||||||
//
|
//
|
||||||
// cl_custom.c
|
// cl_custom.c
|
||||||
@@ -754,23 +739,24 @@ void CL_ClearResourceLists( void );
|
|||||||
void CL_Parse_Debug( qboolean enable );
|
void CL_Parse_Debug( qboolean enable );
|
||||||
void CL_Parse_RecordCommand( int cmd, int startoffset );
|
void CL_Parse_RecordCommand( int cmd, int startoffset );
|
||||||
void CL_ResetFrame( frame_t *frame );
|
void CL_ResetFrame( frame_t *frame );
|
||||||
void CL_WriteMessageHistory( void );
|
|
||||||
const char *CL_MsgInfo( int cmd );
|
//
|
||||||
|
// cl_efx.c
|
||||||
|
//
|
||||||
|
void CL_Particle( const vec3_t org, int color, float life, int zpos, int zvel );
|
||||||
|
|
||||||
//
|
//
|
||||||
// cl_main.c
|
// cl_main.c
|
||||||
//
|
//
|
||||||
void CL_Init( void );
|
void CL_Init( void );
|
||||||
void CL_SendCommand( void );
|
|
||||||
void CL_Disconnect_f( void );
|
void CL_Disconnect_f( void );
|
||||||
void CL_ProcessFile( qboolean successfully_received, const char *filename );
|
void CL_ProcessFile( qboolean successfully_received, const char *filename );
|
||||||
void CL_WriteUsercmd( sizebuf_t *msg, int from, int to );
|
void CL_WriteUsercmd( sizebuf_t *msg, int from, int to );
|
||||||
int CL_GetFragmentSize( void *unused );
|
int CL_GetFragmentSize( void *unused , fragsize_t mode );
|
||||||
qboolean CL_PrecacheResources( void );
|
qboolean CL_PrecacheResources( void );
|
||||||
void CL_SetupOverviewParams( void );
|
void CL_SetupOverviewParams( void );
|
||||||
void CL_UpdateFrameLerp( void );
|
void CL_UpdateFrameLerp( void );
|
||||||
int CL_IsDevOverviewMode( void );
|
int CL_IsDevOverviewMode( void );
|
||||||
void CL_PingServers_f( void );
|
|
||||||
void CL_SignonReply( void );
|
void CL_SignonReply( void );
|
||||||
void CL_ClearState( void );
|
void CL_ClearState( void );
|
||||||
|
|
||||||
@@ -788,8 +774,6 @@ void CL_CheckStartupDemos( void );
|
|||||||
void CL_WriteDemoJumpTime( void );
|
void CL_WriteDemoJumpTime( void );
|
||||||
void CL_CloseDemoHeader( void );
|
void CL_CloseDemoHeader( void );
|
||||||
void CL_DemoCompleted( void );
|
void CL_DemoCompleted( void );
|
||||||
void CL_StopPlayback( void );
|
|
||||||
void CL_StopRecord( void );
|
|
||||||
void CL_PlayDemo_f( void );
|
void CL_PlayDemo_f( void );
|
||||||
void CL_TimeDemo_f( void );
|
void CL_TimeDemo_f( void );
|
||||||
void CL_StartDemos_f( void );
|
void CL_StartDemos_f( void );
|
||||||
@@ -797,6 +781,7 @@ void CL_Demos_f( void );
|
|||||||
void CL_DeleteDemo_f( void );
|
void CL_DeleteDemo_f( void );
|
||||||
void CL_Record_f( void );
|
void CL_Record_f( void );
|
||||||
void CL_Stop_f( void );
|
void CL_Stop_f( void );
|
||||||
|
int CL_GetDemoComment( const char *demoname, char *comment );
|
||||||
|
|
||||||
//
|
//
|
||||||
// cl_events.c
|
// cl_events.c
|
||||||
@@ -804,53 +789,70 @@ void CL_Stop_f( void );
|
|||||||
void CL_ParseEvent( sizebuf_t *msg );
|
void CL_ParseEvent( sizebuf_t *msg );
|
||||||
void CL_ParseReliableEvent( sizebuf_t *msg );
|
void CL_ParseReliableEvent( sizebuf_t *msg );
|
||||||
void CL_SetEventIndex( const char *szEvName, int ev_index );
|
void CL_SetEventIndex( const char *szEvName, int ev_index );
|
||||||
void CL_QueueEvent( int flags, int index, float delay, event_args_t *args );
|
|
||||||
void CL_PlaybackEvent( int flags, const edict_t *pInvoker, word eventindex, float delay, float *origin,
|
void CL_PlaybackEvent( int flags, const edict_t *pInvoker, word eventindex, float delay, float *origin,
|
||||||
float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 );
|
float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 );
|
||||||
void CL_RegisterEvent( int lastnum, const char *szEvName, pfnEventHook func );
|
void CL_RegisterEvent( int lastnum, const char *szEvName, pfnEventHook func );
|
||||||
void CL_BatchResourceRequest( qboolean initialize );
|
|
||||||
int CL_EstimateNeededResources( void );
|
|
||||||
void CL_ResetEvent( event_info_t *ei );
|
void CL_ResetEvent( event_info_t *ei );
|
||||||
word CL_EventIndex( const char *name );
|
word CL_EventIndex( const char *name );
|
||||||
void CL_FireEvents( void );
|
void CL_FireEvents( void );
|
||||||
|
|
||||||
|
//
|
||||||
|
// cl_font.c
|
||||||
|
//
|
||||||
|
qboolean CL_FixedFont( cl_font_t *font );
|
||||||
|
qboolean Con_LoadFixedWidthFont( const char *fontname, cl_font_t *font, float scale, convar_t *rendermode, uint texFlags );
|
||||||
|
qboolean Con_LoadVariableWidthFont( const char *fontname, cl_font_t *font, float scale, convar_t *rendermode, uint texFlags );
|
||||||
|
void CL_FreeFont( cl_font_t *font );
|
||||||
|
void CL_SetFontRendermode( cl_font_t *font );
|
||||||
|
int CL_DrawCharacter( float x, float y, int number, rgba_t color, cl_font_t *font, int flags );
|
||||||
|
int CL_DrawString( float x, float y, const char *s, rgba_t color, cl_font_t *font, int flags );
|
||||||
|
void CL_DrawCharacterLen( cl_font_t *font, int number, int *width, int *height );
|
||||||
|
void CL_DrawStringLen( cl_font_t *font, const char *s, int *width, int *height, int flags );
|
||||||
|
int CL_DrawStringf( cl_font_t *font, float x, float y, rgba_t color, int flags, const char *fmt, ... ) _format( 6 );
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// cl_game.c
|
// cl_game.c
|
||||||
//
|
//
|
||||||
void CL_UnloadProgs( void );
|
void CL_UnloadProgs( void );
|
||||||
qboolean CL_LoadProgs( const char *name );
|
qboolean CL_LoadProgs( const char *name );
|
||||||
void CL_ParseUserMessage( sizebuf_t *msg, int svc_num );
|
|
||||||
void CL_LinkUserMessage( char *pszName, const int svc_num, int iSize );
|
void CL_LinkUserMessage( char *pszName, const int svc_num, int iSize );
|
||||||
void CL_ParseFinaleCutscene( sizebuf_t *msg, int level );
|
|
||||||
void CL_ParseTextMessage( sizebuf_t *msg );
|
|
||||||
void CL_DrawHUD( int state );
|
void CL_DrawHUD( int state );
|
||||||
void CL_InitEdicts( void );
|
void CL_InitEdicts( int maxclients );
|
||||||
void CL_FreeEdicts( void );
|
void CL_FreeEdicts( void );
|
||||||
void CL_ClearWorld( void );
|
void CL_ClearWorld( void );
|
||||||
void CL_DrawCenterPrint( void );
|
void CL_DrawCenterPrint( void );
|
||||||
void CL_ClearSpriteTextures( void );
|
void CL_ClearSpriteTextures( void );
|
||||||
void CL_FreeEntity( cl_entity_t *pEdict );
|
|
||||||
void CL_CenterPrint( const char *text, float y );
|
void CL_CenterPrint( const char *text, float y );
|
||||||
void CL_TextMessageParse( byte *pMemFile, int fileSize );
|
void CL_TextMessageParse( byte *pMemFile, int fileSize );
|
||||||
client_textmessage_t *CL_TextMessageGet( const char *pName );
|
client_textmessage_t *CL_TextMessageGet( const char *pName );
|
||||||
int pfnDecalIndexFromName( const char *szDecalName );
|
|
||||||
int pfnIndexFromTrace( struct pmtrace_s *pTrace );
|
|
||||||
model_t *CL_ModelHandle( int modelindex );
|
model_t *CL_ModelHandle( int modelindex );
|
||||||
void NetAPI_CancelAllRequests( void );
|
void NetAPI_CancelAllRequests( void );
|
||||||
int CL_FindModelIndex( const char *m );
|
|
||||||
cl_entity_t *CL_GetLocalPlayer( void );
|
cl_entity_t *CL_GetLocalPlayer( void );
|
||||||
model_t *CL_LoadClientSprite( const char *filename );
|
model_t *CL_LoadClientSprite( const char *filename );
|
||||||
model_t *CL_LoadModel( const char *modelname, int *index );
|
model_t *CL_LoadModel( const char *modelname, int *index );
|
||||||
HSPRITE pfnSPR_Load( const char *szPicName );
|
|
||||||
HSPRITE pfnSPR_LoadExt( const char *szPicName, uint texFlags );
|
HSPRITE pfnSPR_LoadExt( const char *szPicName, uint texFlags );
|
||||||
void PicAdjustSize( float *x, float *y, float *w, float *h );
|
void SPR_AdjustSize( float *x, float *y, float *w, float *h );
|
||||||
void CL_FillRGBA( int x, int y, int width, int height, int r, int g, int b, int a );
|
int CL_GetScreenInfo( SCREENINFO *pscrinfo );
|
||||||
void CL_PlayerTrace( float *start, float *end, int traceFlags, int ignore_pe, pmtrace_t *tr );
|
pmtrace_t *PM_CL_TraceLine( float *start, float *end, int flags, int usehull, int ignore_pe );
|
||||||
void CL_PlayerTraceExt( float *start, float *end, int traceFlags, int (*pfnIgnore)( physent_t *pe ), pmtrace_t *tr );
|
const char *PM_CL_TraceTexture( int ground, float *vstart, float *vend );
|
||||||
void CL_SetTraceHull( int hull );
|
int PM_CL_PointContents( const float *p, int *truecontents );
|
||||||
|
physent_t *pfnGetPhysent( int idx );
|
||||||
|
struct msurface_s *pfnTraceSurface( int ground, float *vstart, float *vend );
|
||||||
|
movevars_t *pfnGetMoveVars( void );
|
||||||
|
void CL_EnableScissor( scissor_state_t *scissor, int x, int y, int width, int height );
|
||||||
|
void CL_DisableScissor( scissor_state_t *scissor );
|
||||||
|
qboolean CL_Scissor( const scissor_state_t *scissor, float *x, float *y, float *width, float *height, float *u0, float *v0, float *u1, float *v1 );
|
||||||
|
struct cl_entity_s *CL_GetEntityByIndex( int index );
|
||||||
|
|
||||||
_inline cl_entity_t *CL_EDICT_NUM( int n )
|
_inline cl_entity_t *CL_EDICT_NUM( int n )
|
||||||
{
|
{
|
||||||
|
if( !clgame.entities )
|
||||||
|
{
|
||||||
|
Host_Error( "CL_EDICT_NUM: clgame.entities is NULL\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if(( n >= 0 ) && ( n < clgame.maxEntities ))
|
if(( n >= 0 ) && ( n < clgame.maxEntities ))
|
||||||
return clgame.entities + n;
|
return clgame.entities + n;
|
||||||
|
|
||||||
@@ -861,14 +863,49 @@ _inline cl_entity_t *CL_EDICT_NUM( int n )
|
|||||||
//
|
//
|
||||||
// cl_parse.c
|
// cl_parse.c
|
||||||
//
|
//
|
||||||
|
void CL_ParseSetAngle( sizebuf_t *msg );
|
||||||
|
void CL_ParseServerData( sizebuf_t *msg, qboolean legacy );
|
||||||
|
void CL_ParseLightStyle( sizebuf_t *msg );
|
||||||
|
void CL_UpdateUserinfo( sizebuf_t *msg, qboolean legacy );
|
||||||
|
void CL_ParseResource( sizebuf_t *msg );
|
||||||
|
void CL_ParseClientData( sizebuf_t *msg );
|
||||||
|
void CL_UpdateUserPings( sizebuf_t *msg );
|
||||||
|
void CL_ParseParticles( sizebuf_t *msg );
|
||||||
|
void CL_ParseRestoreSoundPacket( sizebuf_t *msg );
|
||||||
|
void CL_ParseBaseline( sizebuf_t *msg, qboolean legacy );
|
||||||
|
void CL_ParseSignon( sizebuf_t *msg );
|
||||||
|
void CL_ParseRestore( sizebuf_t *msg );
|
||||||
|
void CL_ParseStaticDecal( sizebuf_t *msg );
|
||||||
|
void CL_ParseAddAngle( sizebuf_t *msg );
|
||||||
|
void CL_RegisterUserMessage( sizebuf_t *msg );
|
||||||
|
void CL_ParseMovevars( sizebuf_t *msg );
|
||||||
|
void CL_ParseResourceRequest( sizebuf_t *msg );
|
||||||
|
void CL_ParseCustomization( sizebuf_t *msg );
|
||||||
|
void CL_ParseCrosshairAngle( sizebuf_t *msg );
|
||||||
|
void CL_ParseSoundFade( sizebuf_t *msg );
|
||||||
|
void CL_ParseFileTransferFailed( sizebuf_t *msg );
|
||||||
|
void CL_ParseHLTV( sizebuf_t *msg );
|
||||||
|
void CL_ParseDirector( sizebuf_t *msg );
|
||||||
|
void CL_ParseResLocation( sizebuf_t *msg );
|
||||||
|
void CL_ParseCvarValue( sizebuf_t *msg, const qboolean ext );
|
||||||
void CL_ParseServerMessage( sizebuf_t *msg, qboolean normal_message );
|
void CL_ParseServerMessage( sizebuf_t *msg, qboolean normal_message );
|
||||||
void CL_ParseTempEntity( sizebuf_t *msg );
|
void CL_ParseTempEntity( sizebuf_t *msg );
|
||||||
void CL_StartResourceDownloading( const char *pszMessage, qboolean bCustom );
|
|
||||||
qboolean CL_DispatchUserMessage( const char *pszName, int iSize, void *pbuf );
|
qboolean CL_DispatchUserMessage( const char *pszName, int iSize, void *pbuf );
|
||||||
qboolean CL_RequestMissingResources( void );
|
qboolean CL_RequestMissingResources( void );
|
||||||
void CL_RegisterResources ( sizebuf_t *msg );
|
void CL_RegisterResources ( sizebuf_t *msg );
|
||||||
void CL_ParseViewEntity( sizebuf_t *msg );
|
void CL_ParseViewEntity( sizebuf_t *msg );
|
||||||
void CL_ParseServerTime( sizebuf_t *msg );
|
void CL_ParseServerTime( sizebuf_t *msg );
|
||||||
|
void CL_ParseUserMessage( sizebuf_t *msg, int svc_num );
|
||||||
|
void CL_ParseFinaleCutscene( sizebuf_t *msg, int level );
|
||||||
|
void CL_ParseTextMessage( sizebuf_t *msg );
|
||||||
|
void CL_BatchResourceRequest( qboolean initialize );
|
||||||
|
int CL_EstimateNeededResources( void );
|
||||||
|
|
||||||
|
//
|
||||||
|
// cl_parse_48.c
|
||||||
|
//
|
||||||
|
void CL_ParseLegacyServerMessage( sizebuf_t *msg, qboolean normal_message );
|
||||||
|
void CL_LegacyPrecache_f( void );
|
||||||
|
|
||||||
//
|
//
|
||||||
// cl_scrn.c
|
// cl_scrn.c
|
||||||
@@ -876,8 +913,6 @@ void CL_ParseServerTime( sizebuf_t *msg );
|
|||||||
void SCR_VidInit( void );
|
void SCR_VidInit( void );
|
||||||
void SCR_TileClear( void );
|
void SCR_TileClear( void );
|
||||||
void SCR_DirtyScreen( void );
|
void SCR_DirtyScreen( void );
|
||||||
void SCR_AddDirtyPoint( int x, int y );
|
|
||||||
void SCR_InstallParticlePalette( void );
|
|
||||||
void SCR_EndLoadingPlaque( void );
|
void SCR_EndLoadingPlaque( void );
|
||||||
void SCR_RegisterTextures( void );
|
void SCR_RegisterTextures( void );
|
||||||
void SCR_LoadCreditsFont( void );
|
void SCR_LoadCreditsFont( void );
|
||||||
@@ -886,6 +921,7 @@ void SCR_MakeLevelShot( void );
|
|||||||
void SCR_NetSpeeds( void );
|
void SCR_NetSpeeds( void );
|
||||||
void SCR_RSpeeds( void );
|
void SCR_RSpeeds( void );
|
||||||
void SCR_DrawFPS( int height );
|
void SCR_DrawFPS( int height );
|
||||||
|
void SCR_DrawPos( void );
|
||||||
|
|
||||||
//
|
//
|
||||||
// cl_netgraph.c
|
// cl_netgraph.c
|
||||||
@@ -912,81 +948,77 @@ void CL_InitClientMove( void );
|
|||||||
void CL_PredictMovement( qboolean repredicting );
|
void CL_PredictMovement( qboolean repredicting );
|
||||||
void CL_CheckPredictionError( void );
|
void CL_CheckPredictionError( void );
|
||||||
qboolean CL_IsPredicted( void );
|
qboolean CL_IsPredicted( void );
|
||||||
int CL_TruePointContents( const vec3_t p );
|
|
||||||
int CL_PointContents( const vec3_t p );
|
|
||||||
int CL_WaterEntity( const float *rgflPos );
|
int CL_WaterEntity( const float *rgflPos );
|
||||||
cl_entity_t *CL_GetWaterEntity( const float *rgflPos );
|
cl_entity_t *CL_GetWaterEntity( const float *rgflPos );
|
||||||
void CL_SetupPMove( playermove_t *pmove, local_state_t *from, usercmd_t *ucmd, qboolean runfuncs, double time );
|
|
||||||
int CL_TestLine( const vec3_t start, const vec3_t end, int flags );
|
|
||||||
pmtrace_t *CL_VisTraceLine( vec3_t start, vec3_t end, int flags );
|
pmtrace_t *CL_VisTraceLine( vec3_t start, vec3_t end, int flags );
|
||||||
pmtrace_t CL_TraceLine( vec3_t start, vec3_t end, int flags );
|
pmtrace_t CL_TraceLine( vec3_t start, vec3_t end, int flags );
|
||||||
void CL_PushTraceBounds( int hullnum, const float *mins, const float *maxs );
|
|
||||||
void CL_PopTraceBounds( void );
|
|
||||||
void CL_MoveSpectatorCamera( void );
|
void CL_MoveSpectatorCamera( void );
|
||||||
void CL_SetLastUpdate( void );
|
void CL_SetLastUpdate( void );
|
||||||
void CL_RedoPrediction( void );
|
void CL_RedoPrediction( void );
|
||||||
void CL_ClearPhysEnts( void );
|
|
||||||
void CL_PushPMStates( void );
|
void CL_PushPMStates( void );
|
||||||
void CL_PopPMStates( void );
|
void CL_PopPMStates( void );
|
||||||
void CL_SetUpPlayerPrediction( int dopred, int bIncludeLocalClient );
|
void CL_SetUpPlayerPrediction( int dopred, int bIncludeLocalClient );
|
||||||
|
void CL_SetIdealPitch( void );
|
||||||
|
|
||||||
//
|
//
|
||||||
// cl_qparse.c
|
// cl_qparse.c
|
||||||
//
|
//
|
||||||
void CL_ParseQuakeMessage( sizebuf_t *msg, qboolean normal_message );
|
void CL_ParseQuakeMessage( sizebuf_t *msg, qboolean normal_message );
|
||||||
|
|
||||||
//
|
|
||||||
// cl_studio.c
|
|
||||||
//
|
|
||||||
void CL_InitStudioAPI( void );
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// cl_frame.c
|
// cl_frame.c
|
||||||
//
|
//
|
||||||
|
struct channel_s;
|
||||||
|
struct rawchan_s;
|
||||||
int CL_ParsePacketEntities( sizebuf_t *msg, qboolean delta );
|
int CL_ParsePacketEntities( sizebuf_t *msg, qboolean delta );
|
||||||
qboolean CL_AddVisibleEntity( cl_entity_t *ent, int entityType );
|
qboolean CL_AddVisibleEntity( cl_entity_t *ent, int entityType );
|
||||||
void CL_ResetLatchedVars( cl_entity_t *ent, qboolean full_reset );
|
void CL_ResetLatchedVars( cl_entity_t *ent, qboolean full_reset );
|
||||||
qboolean CL_GetEntitySpatialization( struct channel_s *ch );
|
qboolean CL_GetEntitySpatialization( struct channel_s *ch );
|
||||||
qboolean CL_GetMovieSpatialization( struct rawchan_s *ch );
|
qboolean CL_GetMovieSpatialization( struct rawchan_s *ch );
|
||||||
void CL_ProcessPlayerState( int playerindex, entity_state_t *state );
|
|
||||||
void CL_ComputePlayerOrigin( cl_entity_t *clent );
|
void CL_ComputePlayerOrigin( cl_entity_t *clent );
|
||||||
void CL_ProcessPacket( frame_t *frame );
|
void CL_ProcessPacket( frame_t *frame );
|
||||||
void CL_MoveThirdpersonCamera( void );
|
void CL_MoveThirdpersonCamera( void );
|
||||||
qboolean CL_IsPlayerIndex( int idx );
|
qboolean CL_IsPlayerIndex( int idx );
|
||||||
void CL_SetIdealPitch( void );
|
|
||||||
void CL_EmitEntities( void );
|
void CL_EmitEntities( void );
|
||||||
|
|
||||||
//
|
//
|
||||||
// cl_remap.c
|
// cl_remap.c
|
||||||
//
|
//
|
||||||
remap_info_t *CL_GetRemapInfoForEntity( cl_entity_t *e );
|
remap_info_t *CL_GetRemapInfoForEntity( cl_entity_t *e );
|
||||||
void CL_AllocRemapInfo( int topcolor, int bottomcolor );
|
qboolean CL_EntitySetRemapColors( cl_entity_t *e, model_t *mod, int top, int bottom );
|
||||||
void CL_FreeRemapInfo( remap_info_t *info );
|
|
||||||
void R_StudioSetRemapColors( int top, int bottom );
|
|
||||||
void CL_UpdateRemapInfo( int topcolor, int bottomcolor );
|
|
||||||
void CL_ClearAllRemaps( void );
|
void CL_ClearAllRemaps( void );
|
||||||
|
|
||||||
|
//
|
||||||
|
// cl_render.c
|
||||||
|
//
|
||||||
|
qboolean R_InitRenderAPI( void );
|
||||||
|
intptr_t CL_RenderGetParm( const int parm, const int arg, const qboolean checkRef );
|
||||||
|
lightstyle_t *CL_GetLightStyle( int number );
|
||||||
|
int R_FatPVS( const vec3_t org, float radius, byte *visbuffer, qboolean merge, qboolean fullvis );
|
||||||
|
const ref_overview_t *GL_GetOverviewParms( void );
|
||||||
|
|
||||||
|
//
|
||||||
|
// cl_efrag.c
|
||||||
|
//
|
||||||
|
void R_StoreEfrags( efrag_t **ppefrag, int framecount );
|
||||||
|
void R_AddEfrags( cl_entity_t *ent );
|
||||||
|
|
||||||
//
|
//
|
||||||
// cl_tent.c
|
// cl_tent.c
|
||||||
//
|
//
|
||||||
int CL_AddEntity( int entityType, cl_entity_t *pEnt );
|
struct particle_s;
|
||||||
void CL_WeaponAnim( int iAnim, int body );
|
void CL_WeaponAnim( int iAnim, int body );
|
||||||
void CL_ClearEffects( void );
|
void CL_ClearEffects( void );
|
||||||
void CL_ClearEfrags( void );
|
void CL_ClearEfrags( void );
|
||||||
void CL_TestLights( void );
|
void CL_TestLights( void );
|
||||||
void CL_DrawParticlesExternal( const ref_viewpass_t *rvp, qboolean trans_pass, float frametime );
|
|
||||||
void CL_FireCustomDecal( int textureIndex, int entityIndex, int modelIndex, float *pos, int flags, float scale );
|
void CL_FireCustomDecal( int textureIndex, int entityIndex, int modelIndex, float *pos, int flags, float scale );
|
||||||
void CL_DecalShoot( int textureIndex, int entityIndex, int modelIndex, float *pos, int flags );
|
void CL_DecalShoot( int textureIndex, int entityIndex, int modelIndex, float *pos, int flags );
|
||||||
void CL_PlayerDecal( int playerIndex, int textureIndex, int entityIndex, float *pos );
|
|
||||||
void R_FreeDeadParticles( struct particle_s **ppparticles );
|
void R_FreeDeadParticles( struct particle_s **ppparticles );
|
||||||
void CL_AddClientResource( const char *filename, int type );
|
void CL_AddClientResource( const char *filename, int type );
|
||||||
void CL_AddClientResources( void );
|
void CL_AddClientResources( void );
|
||||||
int CL_FxBlend( cl_entity_t *e );
|
|
||||||
void CL_InitParticles( void );
|
void CL_InitParticles( void );
|
||||||
void CL_ClearParticles( void );
|
void CL_ClearParticles( void );
|
||||||
void CL_FreeParticles( void );
|
void CL_FreeParticles( void );
|
||||||
void CL_DrawParticles( double frametime );
|
|
||||||
void CL_DrawTracers( double frametime );
|
|
||||||
void CL_InitTempEnts( void );
|
void CL_InitTempEnts( void );
|
||||||
void CL_ClearTempEnts( void );
|
void CL_ClearTempEnts( void );
|
||||||
void CL_FreeTempEnts( void );
|
void CL_FreeTempEnts( void );
|
||||||
@@ -994,20 +1026,20 @@ void CL_TempEntUpdate( void );
|
|||||||
void CL_InitViewBeams( void );
|
void CL_InitViewBeams( void );
|
||||||
void CL_ClearViewBeams( void );
|
void CL_ClearViewBeams( void );
|
||||||
void CL_FreeViewBeams( void );
|
void CL_FreeViewBeams( void );
|
||||||
void CL_DrawBeams( int fTrans );
|
cl_entity_t *R_BeamGetEntity( int index );
|
||||||
void CL_AddCustomBeam( cl_entity_t *pEnvBeam );
|
|
||||||
void CL_KillDeadBeams( cl_entity_t *pDeadEntity );
|
void CL_KillDeadBeams( cl_entity_t *pDeadEntity );
|
||||||
void CL_ParseViewBeam( sizebuf_t *msg, int beamType );
|
void CL_ParseViewBeam( sizebuf_t *msg, int beamType );
|
||||||
void CL_LoadClientSprites( void );
|
void CL_LoadClientSprites( void );
|
||||||
void CL_ReadPointFile_f( void );
|
void CL_ReadPointFile_f( void );
|
||||||
|
void CL_DrawEFX( float time, qboolean fTrans );
|
||||||
|
void CL_ThinkParticle( double frametime, particle_t *p );
|
||||||
void CL_ReadLineFile_f( void );
|
void CL_ReadLineFile_f( void );
|
||||||
void CL_RunLightStyles( void );
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// console.c
|
// console.c
|
||||||
//
|
//
|
||||||
extern convar_t *con_fontsize;
|
extern convar_t con_fontsize;
|
||||||
qboolean Con_Visible( void );
|
int Con_Visible( void );
|
||||||
qboolean Con_FixedFont( void );
|
qboolean Con_FixedFont( void );
|
||||||
void Con_VidInit( void );
|
void Con_VidInit( void );
|
||||||
void Con_Shutdown( void );
|
void Con_Shutdown( void );
|
||||||
@@ -1017,25 +1049,29 @@ void Con_DrawDebug( void );
|
|||||||
void Con_RunConsole( void );
|
void Con_RunConsole( void );
|
||||||
void Con_DrawConsole( void );
|
void Con_DrawConsole( void );
|
||||||
void Con_DrawVersion( void );
|
void Con_DrawVersion( void );
|
||||||
void Con_DrawStringLen( const char *pText, int *length, int *height );
|
int Con_UtfProcessChar( int in );
|
||||||
int Con_DrawString( int x, int y, const char *string, rgba_t setColor );
|
int Con_UtfProcessCharForce( int in );
|
||||||
int Con_DrawCharacter( int x, int y, int number, rgba_t color );
|
int Con_UtfMoveLeft( char *str, int pos );
|
||||||
|
int Con_UtfMoveRight( char *str, int pos, int length );
|
||||||
|
void Con_DefaultColor( int r, int g, int b, qboolean gameui );
|
||||||
|
cl_font_t *Con_GetCurFont( void );
|
||||||
|
cl_font_t *Con_GetFont( int num );
|
||||||
void Con_DrawCharacterLen( int number, int *width, int *height );
|
void Con_DrawCharacterLen( int number, int *width, int *height );
|
||||||
void Con_DefaultColor( int r, int g, int b );
|
int Con_DrawString( int x, int y, const char *string, rgba_t setColor ); // legacy, use cl_font.c
|
||||||
void Con_InvalidateFonts( void );
|
void GAME_EXPORT Con_DrawStringLen( const char *pText, int *length, int *height ); // legacy, use cl_font.c
|
||||||
void Con_SetFont( int fontNum );
|
|
||||||
void Con_CharEvent( int key );
|
void Con_CharEvent( int key );
|
||||||
void Con_RestoreFont( void );
|
|
||||||
void Key_Console( int key );
|
void Key_Console( int key );
|
||||||
void Key_Message( int key );
|
void Key_Message( int key );
|
||||||
void Con_FastClose( void );
|
void Con_FastClose( void );
|
||||||
|
void Con_Bottom( void );
|
||||||
|
void Con_PageDown( int lines );
|
||||||
|
void Con_PageUp( int lines );
|
||||||
|
|
||||||
//
|
//
|
||||||
// s_main.c
|
// s_main.c
|
||||||
//
|
//
|
||||||
void S_StreamRawSamples( int samples, int rate, int width, int channels, const byte *data );
|
|
||||||
void S_StreamAviSamples( void *Avi, int entnum, float fvol, float attn, float synctime );
|
void S_StreamAviSamples( void *Avi, int entnum, float fvol, float attn, float synctime );
|
||||||
void S_StartBackgroundTrack( const char *intro, const char *loop, long position, qboolean fullpath );
|
void S_StartBackgroundTrack( const char *intro, const char *loop, int position, qboolean fullpath );
|
||||||
void S_StopBackgroundTrack( void );
|
void S_StopBackgroundTrack( void );
|
||||||
void S_StreamSetPause( int pause );
|
void S_StreamSetPause( int pause );
|
||||||
void S_StartStreaming( void );
|
void S_StartStreaming( void );
|
||||||
@@ -1069,11 +1105,28 @@ qboolean UI_CreditsActive( void );
|
|||||||
void UI_CharEvent( int key );
|
void UI_CharEvent( int key );
|
||||||
qboolean UI_MouseInRect( void );
|
qboolean UI_MouseInRect( void );
|
||||||
qboolean UI_IsVisible( void );
|
qboolean UI_IsVisible( void );
|
||||||
void pfnPIC_Set( HIMAGE hPic, int r, int g, int b, int a );
|
void UI_ResetPing( void );
|
||||||
void pfnPIC_Draw( int x, int y, int width, int height, const wrect_t *prc );
|
void UI_ShowUpdateDialog( qboolean preferStore );
|
||||||
void pfnPIC_DrawTrans( int x, int y, int width, int height, const wrect_t *prc );
|
void UI_ShowMessageBox( const char *text );
|
||||||
void pfnPIC_DrawHoles( int x, int y, int width, int height, const wrect_t *prc );
|
void UI_AddTouchButtonToList( const char *name, const char *texture, const char *command, unsigned char *color, int flags );
|
||||||
void pfnPIC_DrawAdditive( int x, int y, int width, int height, const wrect_t *prc );
|
void UI_ConnectionProgress_Disconnect( void );
|
||||||
|
void UI_ConnectionProgress_Download( const char *pszFileName, const char *pszServerName, const char *pszServerPath, int iCurrent, int iTotal, const char *comment );
|
||||||
|
void UI_ConnectionProgress_DownloadEnd( void );
|
||||||
|
void UI_ConnectionProgress_Precache( void );
|
||||||
|
void UI_ConnectionProgress_Connect( const char *server );
|
||||||
|
void UI_ConnectionProgress_ChangeLevel( void );
|
||||||
|
void UI_ConnectionProgress_ParseServerInfo( const char *server );
|
||||||
|
|
||||||
|
//
|
||||||
|
// cl_mobile.c
|
||||||
|
//
|
||||||
|
qboolean Mobile_Init( void );
|
||||||
|
void Mobile_Shutdown( void );
|
||||||
|
|
||||||
|
//
|
||||||
|
// cl_securedstub.c
|
||||||
|
//
|
||||||
|
void CL_GetSecuredClientAPI( CL_EXPORT_FUNCS F );
|
||||||
|
|
||||||
//
|
//
|
||||||
// cl_video.c
|
// cl_video.c
|
||||||
@@ -1087,4 +1140,26 @@ void SCR_RunCinematic( void );
|
|||||||
void SCR_StopCinematic( void );
|
void SCR_StopCinematic( void );
|
||||||
void CL_PlayVideo_f( void );
|
void CL_PlayVideo_f( void );
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// keys.c
|
||||||
|
//
|
||||||
|
int Key_IsDown( int keynum );
|
||||||
|
void Key_Event( int key, int down );
|
||||||
|
void Key_Init( void );
|
||||||
|
void Key_WriteBindings( file_t *f );
|
||||||
|
const char *Key_GetBinding( int keynum );
|
||||||
|
void Key_SetBinding( int keynum, const char *binding );
|
||||||
|
void Key_ClearStates( void );
|
||||||
|
const char *Key_KeynumToString( int keynum );
|
||||||
|
int Key_StringToKeynum( const char *str );
|
||||||
|
int Key_GetKey( const char *binding );
|
||||||
|
void Key_EnumCmds_f( void );
|
||||||
|
void Key_SetKeyDest( int key_dest );
|
||||||
|
void Key_EnableTextInput( qboolean enable, qboolean force );
|
||||||
|
int Key_ToUpper( int key );
|
||||||
|
void OSK_Draw( void );
|
||||||
|
|
||||||
|
extern rgba_t g_color_table[8];
|
||||||
|
|
||||||
#endif//CLIENT_H
|
#endif//CLIENT_H
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user