Compare commits
1088
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb7f3aba79 | ||
|
|
327f7085f6 | ||
|
|
8aef549cfc | ||
|
|
8dd268b83e | ||
|
|
5fddc3156b | ||
|
|
14400097dd | ||
|
|
c44c0e10c1 | ||
|
|
bbf49db184 | ||
|
|
15787a97bb | ||
|
|
b76ce23ed2 | ||
|
|
d6c5066bfd | ||
|
|
60783d7109 | ||
|
|
db525f15da | ||
|
|
f33daf6bee | ||
|
|
d13928b394 | ||
|
|
5613a0d173 | ||
|
|
aa38586f82 | ||
|
|
d2b1ceb641 | ||
|
|
9dd7e9a25f | ||
|
|
1648273ddd | ||
|
|
3f90e4f12a | ||
|
|
2b9d565f0c | ||
|
|
70af63cc94 | ||
|
|
64b92881f9 | ||
|
|
be5ea069ad | ||
|
|
71e9357114 | ||
|
|
e28f86ac32 | ||
|
|
f97fe4bd65 | ||
|
|
3d0ac03f06 | ||
|
|
094132b7d3 | ||
|
|
51b9c9ae5a | ||
|
|
d31941ef13 | ||
|
|
48db826142 | ||
|
|
32b62d19ff | ||
|
|
e4f2961129 | ||
|
|
eba09dfad2 | ||
|
|
d9b72fcae6 | ||
|
|
6f17e7f735 | ||
|
|
047b82acc0 | ||
|
|
5347039d75 | ||
|
|
edc8095577 | ||
|
|
06f69723c2 | ||
|
|
8218fd4f57 | ||
|
|
6ee22edac5 | ||
|
|
37215ef1f4 | ||
|
|
a2eb2222b9 | ||
|
|
d63b4d9463 | ||
|
|
3bd85c20bc | ||
|
|
f70063c7d8 | ||
|
|
a2f7dd7408 | ||
|
|
147014d43a | ||
|
|
9460d1e9a1 | ||
|
|
b3a9a6b59a | ||
|
|
69f7d669c8 | ||
|
|
74a68b1462 | ||
|
|
006ea90493 | ||
|
|
aede063266 | ||
|
|
5aaeff4c5d | ||
|
|
5f80d6c18d | ||
|
|
7c59c9e6ec | ||
|
|
aae83b3235 | ||
|
|
520165128a | ||
|
|
556ced63cf | ||
|
|
063bf830ff | ||
|
|
7fd3bd412c | ||
|
|
47b9508af2 | ||
|
|
417c44aad0 | ||
|
|
1fefa0a99a | ||
|
|
06db4d2b62 | ||
|
|
bf7fc12a8d | ||
|
|
395daf57fa | ||
|
|
97219b7a84 | ||
|
|
0d5d677eff | ||
|
|
3bd6c99a3b | ||
|
|
1d2d8d58db | ||
|
|
9909b002fe | ||
|
|
ccda1ef104 | ||
|
|
52a882bda2 | ||
|
|
177c60e857 | ||
|
|
0566b96738 | ||
|
|
f72c179f56 | ||
|
|
0da963c794 | ||
|
|
7d885f7100 | ||
|
|
c1c2f794e3 | ||
|
|
8bb1c7a032 | ||
|
|
804123afc1 | ||
|
|
8e4f278ce4 | ||
|
|
3193241b11 | ||
|
|
edb44fa6a2 | ||
|
|
66e9ac3657 | ||
|
|
87e0796bf4 | ||
|
|
6bc6db3665 | ||
|
|
2a4aa51373 | ||
|
|
e15b052570 | ||
|
|
629e249a12 | ||
|
|
86a260bb89 | ||
|
|
6ab2de2787 | ||
|
|
8effdc1615 | ||
|
|
561fc2d01a | ||
|
|
3fd9cf573b | ||
|
|
d7c0bed4eb | ||
|
|
afd1f595e1 | ||
|
|
f47a43df2f | ||
|
|
4385327101 | ||
|
|
4e73c05ef9 | ||
|
|
c01ef035a5 | ||
|
|
b59c080943 | ||
|
|
814c65b290 | ||
|
|
9f1c1c3f18 | ||
|
|
e0df7dfba5 | ||
|
|
220db7212f | ||
|
|
d59f45a26a | ||
|
|
f88d92ecee | ||
|
|
c28188b6d8 | ||
|
|
80419748db | ||
|
|
874e6cd5af | ||
|
|
cd500fc344 | ||
|
|
ae7afc5749 | ||
|
|
b0fa94c781 | ||
|
|
9bf717fae9 | ||
|
|
859c1020e6 | ||
|
|
9108d64820 | ||
|
|
e9d3c1a421 | ||
|
|
f36e069f40 | ||
|
|
1f5c7b1d12 | ||
|
|
94ecb9e634 | ||
|
|
b9db67bc08 | ||
|
|
c152799295 | ||
|
|
f91165857d | ||
|
|
29b93f02f1 | ||
|
|
f9a6452528 | ||
|
|
e7e51957e9 | ||
|
|
f8903e7ce7 | ||
|
|
d3548a4dfb | ||
|
|
eca72c6dc6 | ||
|
|
6e378f4de6 | ||
|
|
94ac52d792 | ||
|
|
1f276a7eb6 | ||
|
|
a28a590078 | ||
|
|
91d052d25e | ||
|
|
2f6ded132d | ||
|
|
51cdc1ce90 | ||
|
|
494fe0b1e7 | ||
|
|
eac5310f5e | ||
|
|
7f4a2f9943 | ||
|
|
28a31301d4 | ||
|
|
1c5e575718 | ||
|
|
4a2d6b2241 | ||
|
|
001baec444 | ||
|
|
1b35d4f03b | ||
|
|
75fc8cb766 | ||
|
|
28bef8c54f | ||
|
|
787973a3d5 | ||
|
|
f0e3ca7c1f | ||
|
|
1b837a81ef | ||
|
|
b74dd85ef2 | ||
|
|
fc9cc62b12 | ||
|
|
e665edb652 | ||
|
|
e81cde8753 | ||
|
|
4e995436c5 | ||
|
|
c57154a8e5 | ||
|
|
31fbba057a | ||
|
|
46fa6e7ba4 | ||
|
|
bbb0379813 | ||
|
|
156b63440e | ||
|
|
20e062b031 | ||
|
|
c98ebc9f35 | ||
|
|
c6001c7bf6 | ||
|
|
2d0945264f | ||
|
|
3d0981cf7b | ||
|
|
cce581fa51 | ||
|
|
2446b804c7 | ||
|
|
20cdb1c5ec | ||
|
|
212b184320 | ||
|
|
37e98f342c | ||
|
|
578f5b85dd | ||
|
|
99b1e3f969 | ||
|
|
8c9ef0e8f3 | ||
|
|
f91d3ccf24 | ||
|
|
691063983e | ||
|
|
b912047f68 | ||
|
|
f2ddbf1e68 | ||
|
|
5cd36e55ab | ||
|
|
1cb590ebb8 | ||
|
|
280e937844 | ||
|
|
5afb55547d | ||
|
|
e3c91629db | ||
|
|
1b0496b1e7 | ||
|
|
b7369b40cb | ||
|
|
6567313de6 | ||
|
|
5ecf3cc36c | ||
|
|
71e3d89181 | ||
|
|
a284ece8e4 | ||
|
|
e73e75e740 | ||
|
|
9bfd61fabc | ||
|
|
a2aeaa51e8 | ||
|
|
b558c3db98 | ||
|
|
0f70bcbf28 | ||
|
|
f7c4600007 | ||
|
|
8910f073e5 | ||
|
|
ea18be1866 | ||
|
|
0bd687eb15 | ||
|
|
25b74bf3dd | ||
|
|
e4f9ca3f3c | ||
|
|
38a3f403bd | ||
|
|
51dd2030a0 | ||
|
|
7e31067e6a | ||
|
|
9bf06ff30b | ||
|
|
85aa726bb7 | ||
|
|
3a67ff3afa | ||
|
|
0a022a4348 | ||
|
|
ad24beea5b | ||
|
|
9026ae7a16 | ||
|
|
2fee9b861f | ||
|
|
b7e2bcf02e | ||
|
|
d548848b18 | ||
|
|
4c628ea74f | ||
|
|
d3ef97f637 | ||
|
|
02bd819f7e | ||
|
|
ea3b4ddeb0 | ||
|
|
ab3ea7475f | ||
|
|
b9b97d0a56 | ||
|
|
e19db23bb5 | ||
|
|
5ec1ca46e5 | ||
|
|
c2c918fdda | ||
|
|
4627989401 | ||
|
|
9552e09471 | ||
|
|
c8fb25066b | ||
|
|
b1cb6d42f4 | ||
|
|
caf7e4a1cf | ||
|
|
6a5c0223c4 | ||
|
|
9ff2d66079 | ||
|
|
2db2b9309d | ||
|
|
7a38c15d59 | ||
|
|
cb7375f873 | ||
|
|
41e52f9e88 | ||
|
|
ce7e30a752 | ||
|
|
3214811fcb | ||
|
|
edda2a5399 | ||
|
|
926bc8e72c | ||
|
|
eadffb6be3 | ||
|
|
cf04e8c23c | ||
|
|
ec5840f840 | ||
|
|
7dc4a7177d | ||
|
|
3d91de8178 | ||
|
|
6ea1abfedc | ||
|
|
5251482dd7 | ||
|
|
dd73787c8b | ||
|
|
340450a67e | ||
|
|
0d40989f4c | ||
|
|
c640096d9c | ||
|
|
76081869e3 | ||
|
|
9156c1b850 | ||
|
|
d78718d8f4 | ||
|
|
eef1e986a6 | ||
|
|
8fa99c34be | ||
|
|
a35fbdd1b5 | ||
|
|
0efef78684 | ||
|
|
62ce17cb4c | ||
|
|
6112be232a | ||
|
|
c1a9c58eb5 | ||
|
|
0393588fe8 | ||
|
|
b7ff0325ea | ||
|
|
c4d39eae25 | ||
|
|
0e88981425 | ||
|
|
ed7fcae33b | ||
|
|
8b967fb3b7 | ||
|
|
4d68a5dc2b | ||
|
|
ecd6ef40ef | ||
|
|
0c9dc33ff0 | ||
|
|
98c27fe8ef | ||
|
|
3d490f52b2 | ||
|
|
c78c17d953 | ||
|
|
ee5d667a24 | ||
|
|
b9653b4ff8 | ||
|
|
78bcfa8cfa | ||
|
|
1f1130efda | ||
|
|
3d7b05d633 | ||
|
|
343bbd8a1a | ||
|
|
f702df48f5 | ||
|
|
bc382366a1 | ||
|
|
c158144b7b | ||
|
|
d4337fbc56 | ||
|
|
e822d8e7d1 | ||
|
|
dc95b2e8d7 | ||
|
|
d226ad38ff | ||
|
|
2a160c5247 | ||
|
|
641a9dc4e2 | ||
|
|
7e71af8d25 | ||
|
|
8e33d2e1b2 | ||
|
|
61118b348c | ||
|
|
84faff82a2 | ||
|
|
d6cf7cc06f | ||
|
|
0688b94729 | ||
|
|
695f53194d | ||
|
|
1b963c9439 | ||
|
|
b50d6dd389 | ||
|
|
2afad9490e | ||
|
|
812a275add | ||
|
|
90ccf7699b | ||
|
|
31ed12d88a | ||
|
|
5a4e44d064 | ||
|
|
515c67fa3a | ||
|
|
81d60165a3 | ||
|
|
cc0fac3546 | ||
|
|
d71ad13fcf | ||
|
|
0d13811305 | ||
|
|
b69cc4e34a | ||
|
|
caf8f383ad | ||
|
|
7db160a8e2 | ||
|
|
202a3d1fb1 | ||
|
|
332135fc6f | ||
|
|
7e895f82b2 | ||
|
|
c5c61f7692 | ||
|
|
bd8a392882 | ||
|
|
36183e6dc8 | ||
|
|
5ae4af54da | ||
|
|
620bdd1419 | ||
|
|
c18eacbb81 | ||
|
|
bb8acc5f51 | ||
|
|
d41f4810d7 | ||
|
|
387c4edb3b | ||
|
|
c3fd7c1a7a | ||
|
|
94f1ec18de | ||
|
|
e00f8f6cee | ||
|
|
79b0a9c833 | ||
|
|
5e8e2f4b3a | ||
|
|
f0158dd915 | ||
|
|
10cf251b46 | ||
|
|
72231e5658 | ||
|
|
c510ff3b1c | ||
|
|
936e138fee | ||
|
|
8325696b55 | ||
|
|
d63f517ae5 | ||
|
|
e74df8db90 | ||
|
|
1a0bf67452 | ||
|
|
f0df9b399b | ||
|
|
f9345308ff | ||
|
|
6ed7c75448 | ||
|
|
cb71167fb7 | ||
|
|
d4292987cc | ||
|
|
5da24a18dc | ||
|
|
1cf7b3e697 | ||
|
|
3f3672497b | ||
|
|
7714304c7a | ||
|
|
ff640639b2 | ||
|
|
0965603c8f | ||
|
|
b8412cec96 | ||
|
|
86b7e192b2 | ||
|
|
32b9e6094b | ||
|
|
3ff7f3158b | ||
|
|
bd83ba8ca9 | ||
|
|
785881c90e | ||
|
|
567ccf8a59 | ||
|
|
11423a6d78 | ||
|
|
ab6b716e78 | ||
|
|
7b1be2e34f | ||
|
|
19d0d247b4 | ||
|
|
1074a9e1d2 | ||
|
|
0648f384bb | ||
|
|
58d72204cc | ||
|
|
067b4c260f | ||
|
|
9e7e4d5fe7 | ||
|
|
7d9609be76 | ||
|
|
7e510f8bc5 | ||
|
|
a16e009370 | ||
|
|
a021c497b6 | ||
|
|
e77159cb58 | ||
|
|
36ac353f1f | ||
|
|
58122bf023 | ||
|
|
c5da23bb02 | ||
|
|
fd45391616 | ||
|
|
11dd80e4e7 | ||
|
|
298f8ef842 | ||
|
|
4c45b9fb85 | ||
|
|
599cea3238 | ||
|
|
0c5685e9eb | ||
|
|
760b82fd63 | ||
|
|
340034adf7 | ||
|
|
d978bfd0db | ||
|
|
de9f9722ac | ||
|
|
4dd9dc03fe | ||
|
|
47fc4aa39a | ||
|
|
84ad608d70 | ||
|
|
d4dd0c9992 | ||
|
|
ac93d027af | ||
|
|
190a95584c | ||
|
|
9ad368e420 | ||
|
|
a524215479 | ||
|
|
6104c36455 | ||
|
|
a04287c9f6 | ||
|
|
99876e3f73 | ||
|
|
f16f498f27 | ||
|
|
4f9b5923bd | ||
|
|
84476cd51f | ||
|
|
bf9a6bde82 | ||
|
|
a6f8f57725 | ||
|
|
02f4c334f0 | ||
|
|
9884b294c6 | ||
|
|
49f22b5790 | ||
|
|
841270e824 | ||
|
|
630ce57303 | ||
|
|
94aed4d1d1 | ||
|
|
cdc0ec96a9 | ||
|
|
751188bcd8 | ||
|
|
c0c44d46bc | ||
|
|
19d8749abf | ||
|
|
c6f9fb2ac2 | ||
|
|
b1cfdfbc14 | ||
|
|
360df11aa6 | ||
|
|
d88cc3251f | ||
|
|
cd7079da92 | ||
|
|
77a0e8213b | ||
|
|
5efa778509 | ||
|
|
02e6463fae | ||
|
|
b411787fe7 | ||
|
|
8fd91194a7 | ||
|
|
4f85e1d603 | ||
|
|
fae0aeb442 | ||
|
|
ec77824a96 | ||
|
|
4127936eef | ||
|
|
ae829375a0 | ||
|
|
a1afcbc855 | ||
|
|
e1e3aa899d | ||
|
|
2644a3bf6e | ||
|
|
6b4e81e1ec | ||
|
|
c705a0f35a | ||
|
|
b1b3102b31 | ||
|
|
2d823d34f9 | ||
|
|
1bb9fb2c67 | ||
|
|
b90e3ce9da | ||
|
|
e04a074a79 | ||
|
|
f98c3311af | ||
|
|
1a8c44af27 | ||
|
|
a57089c1a9 | ||
|
|
87001f7e78 | ||
|
|
1fbb05c938 | ||
|
|
3eef9d3b62 | ||
|
|
af2adf0134 | ||
|
|
bbdfee8d33 | ||
|
|
2c4da83502 | ||
|
|
75f2868971 | ||
|
|
87d9ecc3c8 | ||
|
|
b637943bd9 | ||
|
|
0514475155 | ||
|
|
8cfb39e035 | ||
|
|
a9a7cb7be0 | ||
|
|
f8649a24aa | ||
|
|
ee5a860e07 | ||
|
|
e6f03c1136 | ||
|
|
780162f516 | ||
|
|
a6d32d834b | ||
|
|
cef3c7f032 | ||
|
|
07f8a532f9 | ||
|
|
352adf526a | ||
|
|
df48f9caf9 | ||
|
|
f611053d4f | ||
|
|
39011cd93b | ||
|
|
562cb8cebd | ||
|
|
89ae721421 | ||
|
|
f65f4b32e2 | ||
|
|
303fca6bcc | ||
|
|
4aba159ee8 | ||
|
|
5838e60bf6 | ||
|
|
527e436d57 | ||
|
|
60ede73ff8 | ||
|
|
298d5e95fc | ||
|
|
e9a68f0b7d | ||
|
|
d613cf4d4c | ||
|
|
3487fae95d | ||
|
|
9ee47a071b | ||
|
|
3579fc3dea | ||
|
|
921bff19f1 | ||
|
|
d07420eaeb | ||
|
|
8028db77d8 | ||
|
|
e49a059783 | ||
|
|
482b6e6844 | ||
|
|
aa70635919 | ||
|
|
c331b0fa89 | ||
|
|
fe55744de2 | ||
|
|
15e9d85a14 | ||
|
|
51043b61a1 | ||
|
|
6620d5fb26 | ||
|
|
f547020fc5 | ||
|
|
89ea473c3b | ||
|
|
b60d9d0be7 | ||
|
|
4fdb2174f0 | ||
|
|
06a48584d6 | ||
|
|
e9f9c1009d | ||
|
|
b66ceda525 | ||
|
|
7c9c28f026 | ||
|
|
72f0552ef1 | ||
|
|
877a1f15a9 | ||
|
|
efa2a68805 | ||
|
|
023209bb76 | ||
|
|
da5dcde6ee | ||
|
|
e92c5e1bf9 | ||
|
|
2b7c4ae76c | ||
|
|
ea26db2cbd | ||
|
|
b9e3747f99 | ||
|
|
4d608b7f37 | ||
|
|
9c42b77879 | ||
|
|
a2d0ea9d11 | ||
|
|
298b4d23e8 | ||
|
|
875adb17b1 | ||
|
|
9eb68bf052 | ||
|
|
8cec2dab82 | ||
|
|
5f58e7b343 | ||
|
|
28bb88e9b4 | ||
|
|
04455c9625 | ||
|
|
9853150e57 | ||
|
|
85c7216eaa | ||
|
|
a54384a579 | ||
|
|
19f1d8b847 | ||
|
|
8270b64624 | ||
|
|
81e3810c32 | ||
|
|
c266151071 | ||
|
|
27d55260e8 | ||
|
|
233583657e | ||
|
|
7bb1eed249 | ||
|
|
aa85fc3787 | ||
|
|
c9a88617b1 | ||
|
|
2f899fdfcc | ||
|
|
cdd2b6560e | ||
|
|
60f29edbca | ||
|
|
60cffe1ed1 | ||
|
|
e77e7d1643 | ||
|
|
5dc22f502e | ||
|
|
7a309c1175 | ||
|
|
9ce5baad9e | ||
|
|
a4aa9a76f2 | ||
|
|
befa25de5c | ||
|
|
83175d5c09 | ||
|
|
d8df8e8778 | ||
|
|
09957d0279 | ||
|
|
9e44985f56 | ||
|
|
b657a84699 | ||
|
|
5ec7835556 | ||
|
|
03a864156d | ||
|
|
c823bf3320 | ||
|
|
4f4d2f1f4c | ||
|
|
1bb389052d | ||
|
|
31fdc5bbc1 | ||
|
|
db3833430d | ||
|
|
6d2212d259 | ||
|
|
912c0e7fc4 | ||
|
|
43d232819a | ||
|
|
302eaf60b5 | ||
|
|
84535faa90 | ||
|
|
8c55d3c705 | ||
|
|
ec11b9268f | ||
|
|
a45af4a80c | ||
|
|
df627b6830 | ||
|
|
dfbeaf30ad | ||
|
|
a03f74b125 | ||
|
|
1a01f1299c | ||
|
|
91f0cdbaca | ||
|
|
e50bd4125d | ||
|
|
ded2c8a7c8 | ||
|
|
88ce9fc0a6 | ||
|
|
3c713248b3 | ||
|
|
75f3edcd92 | ||
|
|
081a7779a6 | ||
|
|
6e995207a6 | ||
|
|
3492b77aa0 | ||
|
|
e864901035 | ||
|
|
7ee6de6b6a | ||
|
|
553b8ccf6b | ||
|
|
bceef0b861 | ||
|
|
53cce6c6bb | ||
|
|
b95047d09f | ||
|
|
c6cb4375f5 | ||
|
|
a07e2b8eda | ||
|
|
98e7002167 | ||
|
|
3428dde3c6 | ||
|
|
13d48f982b | ||
|
|
b2e4dc27e4 | ||
|
|
deddeab049 | ||
|
|
c3a6410822 | ||
|
|
c5915091aa | ||
|
|
4401f0659e | ||
|
|
a0c72d32e8 | ||
|
|
1493045ec4 | ||
|
|
210efb2be7 | ||
|
|
a02fc1de63 | ||
|
|
7755bfc861 | ||
|
|
01172bca77 | ||
|
|
143cbc8587 | ||
|
|
b65f655a8a | ||
|
|
ed04c86369 | ||
|
|
c0eaa17eb3 | ||
|
|
6383a55038 | ||
|
|
574df60d58 | ||
|
|
61ee575cd3 | ||
|
|
bdd963081e | ||
|
|
6b908d7a14 | ||
|
|
7d0d70c094 | ||
|
|
e75c5a9248 | ||
|
|
b8ed5f4f1a | ||
|
|
660d7060e4 | ||
|
|
79c5f57714 | ||
|
|
606d8fbe55 | ||
|
|
edfa116a40 | ||
|
|
55ca0c712f | ||
|
|
16bef488ee | ||
|
|
82d784d9f8 | ||
|
|
103fb2dfc1 | ||
|
|
bba3e1810b | ||
|
|
af5333f63e | ||
|
|
ea77a5fb53 | ||
|
|
a4aef0894b | ||
|
|
bab7972518 | ||
|
|
88853a7aee | ||
|
|
d3339df853 | ||
|
|
385614b448 | ||
|
|
c47ba80f5d | ||
|
|
6de0700f49 | ||
|
|
d9fe52b1a1 | ||
|
|
ccfc476ec0 | ||
|
|
f518b3c48b | ||
|
|
81d52db722 | ||
|
|
df9973da99 | ||
|
|
ca4c779c66 | ||
|
|
7897352175 | ||
|
|
e0e75eac33 | ||
|
|
31d83dd26e | ||
|
|
698a0b811f | ||
|
|
f69609b403 | ||
|
|
56259e3476 | ||
|
|
f3dfa53f31 | ||
|
|
e10d60c08e | ||
|
|
ad4037351f | ||
|
|
f9e1da8c9f | ||
|
|
2f05137af7 | ||
|
|
c305e31c2e | ||
|
|
a55fabe4f9 | ||
|
|
c58848b298 | ||
|
|
ede644d3c4 | ||
|
|
4ff98e62a9 | ||
|
|
e87fd2fff6 | ||
|
|
33e8b10579 | ||
|
|
d11780f62d | ||
|
|
7706aa0bf0 | ||
|
|
cf96e10552 | ||
|
|
1d01e1e6cd | ||
|
|
a5c4759662 | ||
|
|
e7ff1d693b | ||
|
|
9b4354a057 | ||
|
|
51a46ba92c | ||
|
|
31c4e0d59f | ||
|
|
6b246548c3 | ||
|
|
57dda3843a | ||
|
|
b04ac14751 | ||
|
|
5ad8497db2 | ||
|
|
672f07a5ee | ||
|
|
aceffafc4e | ||
|
|
891b3183ed | ||
|
|
26dd066280 | ||
|
|
157ebdb5fe | ||
|
|
1a18839f82 | ||
|
|
e7f8e7628f | ||
|
|
07190571a1 | ||
|
|
f04d922fca | ||
|
|
7fa382d4e9 | ||
|
|
97766710c0 | ||
|
|
994ee060a7 | ||
|
|
589c27fdcf | ||
|
|
37a018fda4 | ||
|
|
f49381d1c5 | ||
|
|
573095bbad | ||
|
|
0fdcc8e288 | ||
|
|
03d7e26c3d | ||
|
|
3a5cd835ad | ||
|
|
47a8f081e9 | ||
|
|
ad8d691c11 | ||
|
|
8186696e62 | ||
|
|
183ec22923 | ||
|
|
5376995350 | ||
|
|
acb6e30fad | ||
|
|
fe0dabb177 | ||
|
|
194ae46ce8 | ||
|
|
2e9f1bfe90 | ||
|
|
a82adc4948 | ||
|
|
6440c70a38 | ||
|
|
748eb07c9a | ||
|
|
5be2f591d2 | ||
|
|
f2e4950e89 | ||
|
|
7444c5b826 | ||
|
|
5f6cca68cc | ||
|
|
3d33e5351b | ||
|
|
c6e245450d | ||
|
|
36854a16b7 | ||
|
|
b4ee8229ee | ||
|
|
cf0a3841e8 | ||
|
|
3ebd2257f8 | ||
|
|
844d1967cc | ||
|
|
dac37f8938 | ||
|
|
dd74bc7c2b | ||
|
|
7eec58a834 | ||
|
|
da81998c71 | ||
|
|
d1552e7b71 | ||
|
|
c64e10083b | ||
|
|
43e2be58da | ||
|
|
63b60d2546 | ||
|
|
91ddc709eb | ||
|
|
1bcb67ffb9 | ||
|
|
976177c244 | ||
|
|
a37c81a142 | ||
|
|
58de3a35a0 | ||
|
|
44b8a8a0d8 | ||
|
|
b0f5f4338f | ||
|
|
6457847633 | ||
|
|
69d47a5e53 | ||
|
|
02177a7794 | ||
|
|
65c15126f1 | ||
|
|
76c78b8e63 | ||
|
|
f63342ff0f | ||
|
|
e3410cf34c | ||
|
|
7a129047e7 | ||
|
|
343716b7da | ||
|
|
1687fb9120 | ||
|
|
3e89057c23 | ||
|
|
774587efa6 | ||
|
|
2dc8bf321e | ||
|
|
992813d770 | ||
|
|
46882dee93 | ||
|
|
8bbb7b540f | ||
|
|
f5f1ab036d | ||
|
|
f15d556c05 | ||
|
|
570a664db8 | ||
|
|
52f69324d9 | ||
|
|
ea6016b1ba | ||
|
|
30fcffd63c | ||
|
|
50446bbde4 | ||
|
|
b307033aab | ||
|
|
3e5985833c | ||
|
|
8421f02aab | ||
|
|
b6daafec17 | ||
|
|
fc058b669e | ||
|
|
99214b98b9 | ||
|
|
ab35a44ed9 | ||
|
|
125b82a5bb | ||
|
|
f294ea157f | ||
|
|
486ae052ef | ||
|
|
53b5442dad | ||
|
|
507c5f75bd | ||
|
|
0fb72c579e | ||
|
|
c5d6ac63c5 | ||
|
|
a934c76263 | ||
|
|
0098c3bbc0 | ||
|
|
f3eedc03e6 | ||
|
|
17c71a2528 | ||
|
|
d2ecbd7c6e | ||
|
|
2ce7dc0c37 | ||
|
|
b648424c18 | ||
|
|
301754c857 | ||
|
|
c9a3c4c9b8 | ||
|
|
ce0c8b363a | ||
|
|
9d6c38004c | ||
|
|
19a58cc8c6 | ||
|
|
d855c39da2 | ||
|
|
03f4bfecc1 | ||
|
|
c8d9e4c7b3 | ||
|
|
cb2b8f2e7c | ||
|
|
0272dd4c24 | ||
|
|
3b327937c2 | ||
|
|
f8f2f17184 | ||
|
|
2efaebcf89 | ||
|
|
150c695979 | ||
|
|
6fe87ab05a | ||
|
|
f6613a5555 | ||
|
|
947d5c2739 | ||
|
|
1544706ff4 | ||
|
|
e121d1a8a1 | ||
|
|
badbdbf03f | ||
|
|
3b5495b53a | ||
|
|
545027ae64 | ||
|
|
91896433f8 | ||
|
|
a60074fc8a | ||
|
|
eb82aa14bb | ||
|
|
cb4b640730 | ||
|
|
266d9a3c71 | ||
|
|
7a5a704a15 | ||
|
|
29ed8de935 | ||
|
|
3418cab5de | ||
|
|
e2ce015d49 | ||
|
|
0d0ab3f414 | ||
|
|
22b5bcc7e1 | ||
|
|
34d5d73d7e | ||
|
|
7ae4441731 | ||
|
|
d0b7f6203c | ||
|
|
3757f3ae57 | ||
|
|
8f9366da5a | ||
|
|
b8e55f87a9 | ||
|
|
b469f70e02 | ||
|
|
6df69b24db | ||
|
|
0133a5eb23 | ||
|
|
86712c2c48 | ||
|
|
5195caa3c6 | ||
|
|
684ad38d4b | ||
|
|
c6d292a3d7 | ||
|
|
246414a735 | ||
|
|
429bcffaf8 | ||
|
|
d92e7b138c | ||
|
|
cd51ad2a25 | ||
|
|
8732825404 | ||
|
|
fc37cdcc95 | ||
|
|
2435ec9515 | ||
|
|
623fab8ea8 | ||
|
|
e063345c4b | ||
|
|
27533a1dcd | ||
|
|
d232e0e2c6 | ||
|
|
0475489e24 | ||
|
|
34b35db27f | ||
|
|
b47bc12e48 | ||
|
|
4d102dcf68 | ||
|
|
a8c9663200 | ||
|
|
57660cc5af | ||
|
|
c459e918af | ||
|
|
962abba1b2 | ||
|
|
5297d18f92 | ||
|
|
7853e48a6f | ||
|
|
303d87f69d | ||
|
|
9dcdc9500d | ||
|
|
7723bafff6 | ||
|
|
d74a89c6c1 | ||
|
|
cce443be0b | ||
|
|
81fa3d27bf | ||
|
|
493091cd66 | ||
|
|
c75f5ee961 | ||
|
|
083e0ca2e0 | ||
|
|
79bd89016c | ||
|
|
eca7e38763 | ||
|
|
b5cbfb970f | ||
|
|
74e1cafd9d | ||
|
|
ee7381b67d | ||
|
|
7f93bc305d | ||
|
|
c7931ca69c | ||
|
|
90f06a3289 | ||
|
|
0e344a7e02 | ||
|
|
3f91a4e908 | ||
|
|
fb443c58ab | ||
|
|
b233514b58 | ||
|
|
11615171d1 | ||
|
|
2df4738af2 | ||
|
|
9e62f5bd52 | ||
|
|
80349ae8ee | ||
|
|
06d51f2648 | ||
|
|
fcc810f703 | ||
|
|
d6d70e1525 | ||
|
|
e5f79e061c | ||
|
|
ad3c0a1ffd | ||
|
|
2ef935198a | ||
|
|
dc3b9c648a | ||
|
|
2d610d40b6 | ||
|
|
d2c686f48b | ||
|
|
5cafec3262 | ||
|
|
580c42d167 | ||
|
|
dcfec35e57 | ||
|
|
701bac6e11 | ||
|
|
0c46d593d8 | ||
|
|
b867de0667 | ||
|
|
e207b75c7a | ||
|
|
fc3df5bfe4 | ||
|
|
dfb05b9d39 | ||
|
|
19702daecd | ||
|
|
dde4b4df3b | ||
|
|
c070930a8c | ||
|
|
d36b5f7c59 | ||
|
|
0e517907ce | ||
|
|
739e9716ab | ||
|
|
0e5972d895 | ||
|
|
71975658ca | ||
|
|
6572e29a64 | ||
|
|
41b21c2a0c | ||
|
|
2b19d2e6de | ||
|
|
f99aa3459c | ||
|
|
5bce9d5abf | ||
|
|
abe102649e | ||
|
|
424fcdc63a | ||
|
|
a3fd451c74 | ||
|
|
731fd113d2 | ||
|
|
c9ca1bda5c | ||
|
|
58ea822050 | ||
|
|
671484d6f9 | ||
|
|
e6e74194bc | ||
|
|
04432c8368 | ||
|
|
6782876c0c | ||
|
|
4b09e92d7c | ||
|
|
3266f64fb9 | ||
|
|
2a9886e698 | ||
|
|
1319e3a811 | ||
|
|
6cbb40f874 | ||
|
|
07fd6a3ad4 | ||
|
|
8891869013 | ||
|
|
04fc735e12 | ||
|
|
7b9860f1be | ||
|
|
38f26a2bd8 | ||
|
|
a9750f8cff | ||
|
|
ad86e7f34a | ||
|
|
496435ef3b | ||
|
|
5275b31e7e | ||
|
|
e341991703 | ||
|
|
fb65496507 | ||
|
|
abe52ba440 | ||
|
|
ee5d097201 | ||
|
|
0ea182d04f | ||
|
|
8d737c96c9 | ||
|
|
5c93b90c2e | ||
|
|
41bee850da | ||
|
|
416c2a9e9d | ||
|
|
8fa9fccc79 | ||
|
|
c5a4071a06 | ||
|
|
930e48ad39 | ||
|
|
868678f321 | ||
|
|
8530b6512c | ||
|
|
2a5f487e5f | ||
|
|
141f6c51dc | ||
|
|
1fc9492b30 | ||
|
|
65782d3d75 | ||
|
|
b5cb6dfb9d | ||
|
|
6667e4b8bc | ||
|
|
5e2492a930 | ||
|
|
4f07372e0f | ||
|
|
80a1a97083 | ||
|
|
204476c55d | ||
|
|
8fab258778 | ||
|
|
12059955e5 | ||
|
|
3ca1f957ba | ||
|
|
b11362aec1 | ||
|
|
75630df10e | ||
|
|
4d93abb7ac | ||
|
|
731943f980 | ||
|
|
265dc1f296 | ||
|
|
c449ffcc98 | ||
|
|
34500d32d0 | ||
|
|
d3e5dfc346 | ||
|
|
8ed11107eb | ||
|
|
2f51108783 | ||
|
|
2667a66419 | ||
|
|
0fd073f2f0 | ||
|
|
840cf4e00a | ||
|
|
d5d99f94b7 | ||
|
|
dea19e4416 | ||
|
|
f7612d7398 | ||
|
|
e39182607e | ||
|
|
79f1febbce | ||
|
|
120def9676 | ||
|
|
82562bc20d | ||
|
|
1c51361120 | ||
|
|
c07e79deb7 | ||
|
|
81cb1111b4 | ||
|
|
369307181e | ||
|
|
7881e04e6b | ||
|
|
66a72eb1be | ||
|
|
ad77f11859 | ||
|
|
96d177876f | ||
|
|
dc7392f86b | ||
|
|
6f6252b6f8 | ||
|
|
20b32df2c6 | ||
|
|
d413d02bf7 | ||
|
|
426c0366cc | ||
|
|
d3d3655580 | ||
|
|
d4a011ee6d | ||
|
|
b08118734e | ||
|
|
41ee6de784 | ||
|
|
139d2e6be8 | ||
|
|
a866461b0a | ||
|
|
6f61331d46 | ||
|
|
7731ca9fb2 | ||
|
|
3de0c4f5d8 | ||
|
|
2e602f8861 | ||
|
|
1a7d92a082 | ||
|
|
5aa2a0c821 | ||
|
|
4f2328b8dc | ||
|
|
e929e524a3 | ||
|
|
e6b9f18d3d | ||
|
|
7f197ef84e | ||
|
|
a9d7ca3332 | ||
|
|
a65e586de5 | ||
|
|
7072a50060 | ||
|
|
fc1a367c2e | ||
|
|
3b376d85d4 | ||
|
|
9aca8438a2 | ||
|
|
c2d37dfb61 | ||
|
|
3c3bd0f0ea | ||
|
|
958db336b7 | ||
|
|
342d570b3b | ||
|
|
67457c25df | ||
|
|
a98d46f8a8 | ||
|
|
b2fca84b15 | ||
|
|
2e31169738 | ||
|
|
4cda2c8093 | ||
|
|
73b4e8a988 | ||
|
|
82dbfb4379 | ||
|
|
0e2ff2390a | ||
|
|
220d5db739 | ||
|
|
212d475f50 | ||
|
|
b7fbd0433f | ||
|
|
d28dd96aa0 | ||
|
|
0e46f91c51 | ||
|
|
d6dabacb05 | ||
|
|
4363473955 | ||
|
|
7e5fd4e290 | ||
|
|
c30a0cd4f1 | ||
|
|
98d56a38f5 | ||
|
|
f26e95e7c9 | ||
|
|
f39e1a9b70 | ||
|
|
1d5b531ba3 | ||
|
|
a90bd08405 | ||
|
|
1cbb726cab | ||
|
|
ce61d00dcf | ||
|
|
2d92b798c6 | ||
|
|
cc62164a7c | ||
|
|
af510bce93 | ||
|
|
4ba60bedcd | ||
|
|
583bf26129 | ||
|
|
d8c3623141 | ||
|
|
2cd0875da6 | ||
|
|
73d0848f7e | ||
|
|
d757e82e3f | ||
|
|
007238e7dd | ||
|
|
944e019020 | ||
|
|
634f8897b4 | ||
|
|
7651d31c50 | ||
|
|
1702873ab1 | ||
|
|
44e7d5249c | ||
|
|
8ab37040db | ||
|
|
ac203b0ccb | ||
|
|
557546c9c3 | ||
|
|
52a94dbe78 | ||
|
|
f4ffc19981 | ||
|
|
ac3c117b03 | ||
|
|
1ac008ab02 | ||
|
|
58ac86e3bf | ||
|
|
1daf06858b | ||
|
|
a4e8ce7f01 | ||
|
|
ed6e16cdce | ||
|
|
57bb92a36c | ||
|
|
142540e263 | ||
|
|
5a17430747 | ||
|
|
23c84a9e96 | ||
|
|
6bb9dcc216 | ||
|
|
1901e4dbdc | ||
|
|
1657f769da | ||
|
|
c82eb489fe | ||
|
|
9f05befd70 | ||
|
|
f274ed3fd8 | ||
|
|
f6e027abcb | ||
|
|
a92114a854 | ||
|
|
ffb84705d3 | ||
|
|
2f8366b6f9 | ||
|
|
a6f062c126 | ||
|
|
41c24f3bc9 | ||
|
|
af40bdb11b | ||
|
|
00a69e6aed | ||
|
|
04b2d784ce | ||
|
|
a5de51b039 | ||
|
|
4a80e9f20f | ||
|
|
8676769a8f | ||
|
|
2f8c7a81ca | ||
|
|
ac11af6048 | ||
|
|
7c558802a4 | ||
|
|
5a516aa1ad | ||
|
|
4d1b6ed974 | ||
|
|
e8e6bb0499 | ||
|
|
58f94666d1 | ||
|
|
085efaa605 | ||
|
|
6028e392f0 | ||
|
|
fa67dd74a0 | ||
|
|
cb734b50c3 | ||
|
|
087e58b88b | ||
|
|
78b9d67aaa | ||
|
|
a6015e4647 | ||
|
|
fcbe95447a | ||
|
|
760fe392a8 | ||
|
|
5dab606980 | ||
|
|
c265575dfd | ||
|
|
4a1f526ac6 | ||
|
|
497b633661 | ||
|
|
c7f54a98e0 | ||
|
|
7da8c20409 | ||
|
|
116328c7bf | ||
|
|
bd68fef4a2 | ||
|
|
7759d56ad3 | ||
|
|
9c7020a369 | ||
|
|
f8c1903316 | ||
|
|
652423ad14 |
No files matched your search
@@ -4,6 +4,7 @@
|
||||
*.plg
|
||||
*.suo
|
||||
*.vcproj.*.*.user
|
||||
*.kate-swp
|
||||
Win32_LIB_ASM_Debug
|
||||
Win32_LIB_ASM_Release
|
||||
*.bsc
|
||||
|
||||
-12
@@ -192,18 +192,6 @@ from `0` to `#musicdefs-1`, or string indices (which is equal to calling `S_Find
|
||||
Hook is called whenever `S_ShowMusicCredit` (either from game or mod) is called. Takes musicdef as only argument, returning true
|
||||
will overwrite vanilla behavior (not show music credit), can be used to implement custom music credit pop-ups.
|
||||
|
||||
## addHook("SetupVote", function(result, gt, secondgt, prevmap))
|
||||
|
||||
Hook is called whenever server sets up options for vote screen. `result` is table where lua can store options to,
|
||||
(for example, `result[1] = 1` will force green hills as first option), gt is current gametype, secondgt is
|
||||
alternative gametype picked for 3rd entry (for example, gt can be `GT_RACE`, and secondgt can be `GT_MATCH`)
|
||||
prevmap is the previous map that was played (small note - in game code, it is offset by -1, but for lua its offset back,
|
||||
so if previous gamemap was 1, prevmap would also be 1. Which means you can safely do mapheaderinfo[prevmap] to get info on previous map)
|
||||
|
||||
Limitations: currently, game can only change gametype for 3rd option in map (meaning for example, if current gametype is race, and you
|
||||
put battle map in first option, when it gets picked that map will be still run in race gametype). That means, game will only handle maps with
|
||||
different gametype if it is put in 3rd vote option.
|
||||
|
||||
# Other changes
|
||||
|
||||
## P_PlayRinglossSound(source, damager)
|
||||
|
||||
@@ -30,24 +30,6 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
0-Clause BSD License
|
||||
applies to:
|
||||
- qs22k
|
||||
Copyright (c) 2022, Raymond Gardner
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
curl License
|
||||
applies to:
|
||||
|
||||
+6
-19
@@ -49,7 +49,7 @@
|
||||
# Already enabled by default for 32-bit
|
||||
# Windows.
|
||||
# NOCURL=1 - Disable libcurl--HTTP capability.
|
||||
# NOLIBGME=1 - Disable game music emu, retro VGM support.
|
||||
# NOGME=1 - Disable game music emu, retro VGM support.
|
||||
# NOOPENMPT=1 - Disable module (tracker) music support.
|
||||
# NOMIXER=1 - Disable SDL Mixer (audio playback).
|
||||
# NOTHREADS=1 - Disable multithreading.
|
||||
@@ -131,19 +131,9 @@ endif
|
||||
include Makefile.d/util.mk
|
||||
|
||||
ifdef PREFIX
|
||||
ifdef USECLANG
|
||||
CC:=$(PREFIX)-clang
|
||||
CXX:=$(PREFIX)-clang++
|
||||
else
|
||||
CC:=$(PREFIX)-gcc
|
||||
CXX:=$(PREFIX)-g++
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef USECLANG
|
||||
CC=clang
|
||||
CXX=clang++
|
||||
endif
|
||||
|
||||
OBJDUMP_OPTS?=--wide --source --line-numbers
|
||||
|
||||
@@ -246,7 +236,7 @@ endif
|
||||
# build with profiling information
|
||||
ifdef PROFILEMODE
|
||||
opts+=-pg
|
||||
LDFLAGS+=-pg
|
||||
libs+=-pg
|
||||
endif
|
||||
|
||||
ifdef DEBUGMODE
|
||||
@@ -258,10 +248,10 @@ ifdef USELTO
|
||||
# compile with LTO
|
||||
ifdef MINGW
|
||||
opts+=-flto=auto -g
|
||||
LDFLAGS+=-flto=auto -g
|
||||
libs+=-flto=auto -g
|
||||
else
|
||||
opts+=-flto=auto
|
||||
LDFLAGS+=-flto=auto
|
||||
libs+=-flto=auto
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -275,10 +265,8 @@ else
|
||||
opts+=-fsanitize=address
|
||||
libs+=-fsanitize=address
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CC),clang)
|
||||
LDFLAGS+= -fuse-ld=lld
|
||||
opts+=-fsanitize=address
|
||||
libs+=-fsanitize=address
|
||||
endif
|
||||
|
||||
# debug_opts also get passed to windres
|
||||
@@ -293,7 +281,6 @@ cxxopts:=$(opts) $(CXXFLAGS)
|
||||
opts+=$(CWFLAGS) # warning flags that shouldnt be passed to c++ compiler
|
||||
|
||||
libs+=$(LDFLAGS) -lstdc++ -lpthread
|
||||
|
||||
asflags:=$(ASFLAGS) -x assembler-with-cpp
|
||||
|
||||
cc=$(CC)
|
||||
|
||||
@@ -14,6 +14,6 @@ sources+=dedicated/i_threads.c
|
||||
endif
|
||||
|
||||
NOOPENMPT=1
|
||||
NOLIBGME=1
|
||||
NOGME=1
|
||||
NOHW=1
|
||||
NOUPNP=1
|
||||
@@ -73,6 +73,13 @@ libs+=-lbacktrace
|
||||
opts+=-DHAVE_LIBBACKTRACE
|
||||
endif
|
||||
|
||||
#windoze hack
|
||||
ifdef MINGW
|
||||
ifndef NODISCORDRPC
|
||||
HAVE_DISCORDRPC=1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef HAVE_DISCORDRPC
|
||||
$(eval $(call Propogate_flags,DISCORDRPC))
|
||||
libs+=-ldiscord-rpc
|
||||
|
||||
@@ -144,10 +144,6 @@ ifdef GCC81
|
||||
WFLAGS+=-Wno-error=multistatement-macros
|
||||
endif
|
||||
|
||||
ifeq ($(CC),clang)
|
||||
WFLAGS+= -Wno-unknown-pragmas -Wno-cast-align
|
||||
endif
|
||||
|
||||
ifdef NONX86
|
||||
ifdef X86_64 # yeah that SEEMS contradictory
|
||||
opts+=-march=nocona
|
||||
|
||||
@@ -15,7 +15,6 @@ endif
|
||||
|
||||
sources+=win32/Srb2win.rc
|
||||
opts+=-DSTDC_HEADERS
|
||||
libs+=-Wl,-Bstatic -lstdc++ -lpthread -lgcc -Wl,-Bdynamic
|
||||
libs+=-ladvapi32 -lkernel32 -lmsvcrt -luser32
|
||||
|
||||
ifndef DEDICATED
|
||||
@@ -43,10 +42,6 @@ libs+=-Wl,--large-address-aware
|
||||
NOLIBBACKTRACE=1
|
||||
endif
|
||||
|
||||
ifndef NODISCORDRPC
|
||||
HAVE_DISCORDRPC=1
|
||||
endif
|
||||
|
||||
ifndef MINGW64
|
||||
32=32
|
||||
x86=x86
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ struct SourceLocation {
|
||||
|
||||
class IErrorAssertHandler {
|
||||
public:
|
||||
[[ noreturn ]] static void handle(const SourceLocation& source_location, const char* expression) {
|
||||
static void handle(const SourceLocation& source_location, const char* expression) {
|
||||
I_Error("Assertion failed at %s:%u: %s != true",
|
||||
source_location.file_name,
|
||||
source_location.line_number,
|
||||
|
||||
+63
-318
@@ -16,8 +16,6 @@
|
||||
#include <unistd.h> //for unlink
|
||||
#endif
|
||||
|
||||
#include <zlib.h>
|
||||
|
||||
#include "i_time.h"
|
||||
#include "i_net.h"
|
||||
#include "i_system.h"
|
||||
@@ -89,17 +87,6 @@ boolean serverrunning = false;
|
||||
INT32 serverplayer = 0;
|
||||
char motd[254], server_context[8]; // Message of the Day, Unique Context (even without Mumble support)
|
||||
|
||||
#define MAP_ICON_REQUEST_FREQUENCY 8
|
||||
|
||||
static UINT8 map_icon_index; // amount of fragments we have retrieved
|
||||
static UINT8 map_icon_needed; // amount of fragments we need to get the full data set
|
||||
static INT32 map_icon_read; // amount of bytes we have read
|
||||
static UINT32 map_icon_missing; // bitmask of fragments we haven't received yet
|
||||
static tic_t map_icon_last_request; // last time we sent an icon request, to avoid flood
|
||||
static int map_icon_request_count; // current count of icon requests sent
|
||||
static UINT8 *map_icon_data;
|
||||
static patch_t *map_icon;
|
||||
|
||||
plrinfo playerinfo[MAXPLAYERS];
|
||||
SINT8 joinnode = 0; // used for CL_VIEWSERVER
|
||||
|
||||
@@ -1224,10 +1211,6 @@ static inline void CL_DrawConnectionStatus(void)
|
||||
if (!menuactive) // menu already draws its own fade
|
||||
V_DrawFadeScreen(0xFF00, 16); // force default
|
||||
|
||||
// reset the counter for mapicon
|
||||
if (cl_mode != CL_VIEWSERVER)
|
||||
map_icon_request_count = 0;
|
||||
|
||||
if (cl_mode != CL_DOWNLOADFILES && cl_mode != CL_LOADFILES && cl_mode != CL_CHECKFILES && cl_mode != CL_VIEWSERVER
|
||||
#ifdef HAVE_CURL
|
||||
&& cl_mode != CL_DOWNLOADHTTPFILES
|
||||
@@ -1354,48 +1337,11 @@ static inline void CL_DrawConnectionStatus(void)
|
||||
|
||||
V_DrawThinString(12 + 80, 18, V_ALLOWLOWERCASE, va("%s", serverlist[joinnode].info.servername));
|
||||
|
||||
if (map_icon == NULL)
|
||||
{
|
||||
const char *map = va("%sP", serverlist[joinnode].info.mapname);
|
||||
patch_t *current_map = W_LumpExists(map) ? W_CachePatchName(map, PU_CACHE) : NULL;
|
||||
|
||||
// check first if we may have the map icon loaded already
|
||||
if (current_map != NULL)
|
||||
V_DrawSmallScaledPatch(10, 18, 0, current_map);
|
||||
else if (map_icon_data != NULL && map_icon_request_count <= 5)
|
||||
{
|
||||
if (I_GetTime() - map_icon_last_request > MAP_ICON_REQUEST_FREQUENCY)
|
||||
{
|
||||
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||
netbuffer->packettype = PT_NEEDMAPICON;
|
||||
|
||||
// failed to retrieve map icon, request it again
|
||||
HSendPacket(servernode, false, 0, 0);
|
||||
map_icon_last_request = I_GetTime();
|
||||
map_icon_request_count++;
|
||||
}
|
||||
|
||||
V_DrawFill(10, 18, MAP_ICON_WIDTH / 2, MAP_ICON_HEIGHT / 2, 31);
|
||||
char dots[4] = "...";
|
||||
if ((I_GetTime() & 0xf) < 4)
|
||||
dots[0] = '\0';
|
||||
else if ((I_GetTime() & 0xf) < 8)
|
||||
dots[1] = '\0';
|
||||
else if ((I_GetTime() & 0xf) < 12)
|
||||
dots[2] = '\0';
|
||||
V_DrawString(10 + MAP_ICON_WIDTH / 4 - V_StringWidth("...", 0) / 2, 18 + MAP_ICON_HEIGHT / 4 - 3, 0, dots);
|
||||
}
|
||||
else
|
||||
V_DrawSmallScaledPatch(10, 18, 0, W_CachePatchName("BLANKLVL", PU_CACHE));
|
||||
}
|
||||
else
|
||||
V_DrawSmallScaledPatch(10, 18, 0, map_icon);
|
||||
|
||||
if (serverlist[joinnode].info.iszone)
|
||||
V_DrawThinString(12 + 80, 38, V_ALLOWLOWERCASE, va("%s Zone", serverlist[joinnode].info.maptitle));
|
||||
else
|
||||
V_DrawThinString(12 + 80, 38, V_ALLOWLOWERCASE, va("%s", serverlist[joinnode].info.maptitle));
|
||||
const char *map = va("%sP", serverlist[joinnode].info.mapname);
|
||||
patch_t *current_map = W_LumpExists(map) ? W_CachePatchName(map, PU_CACHE) : W_CachePatchName("BLANKLVL", PU_CACHE);
|
||||
V_DrawSmallScaledPatch(10, 18, 0, current_map);
|
||||
|
||||
V_DrawThinString(12 + 80, 38, V_ALLOWLOWERCASE, va("%s", serverlist[joinnode].info.maptitle));
|
||||
V_DrawThinString(12 + 80, 48, V_ALLOWLOWERCASE, va("%s", Gametype_Names[serverlist[joinnode].info.gametype]));
|
||||
|
||||
if (fileneedednum > 0)
|
||||
@@ -1589,12 +1535,12 @@ static boolean CL_SendJoin(void)
|
||||
netbuffer->u.clientcfg.version = VERSION;
|
||||
netbuffer->u.clientcfg.subversion = SUBVERSION;
|
||||
strncpy(netbuffer->u.clientcfg.application, SRB2APPLICATION,
|
||||
sizeof(netbuffer->u.clientcfg.application));
|
||||
sizeof netbuffer->u.clientcfg.application);
|
||||
#ifdef SATURNJOIN
|
||||
netbuffer->u.clientcfg.issaturn = ISSATURN;
|
||||
#endif
|
||||
|
||||
return HSendPacket(servernode, false, 0, sizeof(clientconfig_pak));
|
||||
return HSendPacket(servernode, false, 0, sizeof (clientconfig_pak));
|
||||
}
|
||||
|
||||
static void SV_SendServerInfo(INT32 node, tic_t servertime)
|
||||
@@ -1635,39 +1581,60 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime)
|
||||
|
||||
CopyCaretColors(netbuffer->u.serverinfo.servername, cv_servername.string,
|
||||
MAXSERVERNAME);
|
||||
strncpy(netbuffer->u.serverinfo.mapname, G_BuildMapName(gamemap), sizeof(netbuffer->u.serverinfo.mapname)-1);
|
||||
strncpy(netbuffer->u.serverinfo.mapname, G_BuildMapName(gamemap), 7);
|
||||
|
||||
M_Memcpy(netbuffer->u.serverinfo.mapmd5, mapmd5, sizeof(netbuffer->u.serverinfo.mapmd5));
|
||||
M_Memcpy(netbuffer->u.serverinfo.mapmd5, mapmd5, 16);
|
||||
|
||||
netbuffer->u.serverinfo.iszone = 0;
|
||||
if (!(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE) && !(mapheaderinfo[prevmap]->zonttl[0]))
|
||||
netbuffer->u.serverinfo.iszone = 1;
|
||||
else
|
||||
netbuffer->u.serverinfo.iszone = 0;
|
||||
|
||||
memset(netbuffer->u.serverinfo.maptitle, 0, sizeof(netbuffer->u.serverinfo.maptitle));
|
||||
memset(netbuffer->u.serverinfo.maptitle, 0, 33);
|
||||
memset(netbuffer->u.serverinfo.httpsource, 0, MAX_MIRROR_LENGTH);
|
||||
|
||||
if (!(mapheaderinfo[gamemap-1]->menuflags & LF2_HIDEINMENU) && mapheaderinfo[gamemap-1]->lvlttl[0])
|
||||
{
|
||||
strncpy(netbuffer->u.serverinfo.maptitle, mapheaderinfo[gamemap-1]->lvlttl, sizeof(netbuffer->u.serverinfo.maptitle)-1);
|
||||
|
||||
if (!(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE))
|
||||
//strncpy(netbuffer->u.serverinfo.maptitle, (char *)mapheaderinfo[gamemap-1]->lvlttl, 33);
|
||||
// set up the levelstring
|
||||
if (netbuffer->u.serverinfo.iszone || (mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE))
|
||||
{
|
||||
if (mapheaderinfo[gamemap-1]->zonttl[0])
|
||||
if (mapheaderinfo[gamemap-1]->actnum[0])
|
||||
snprintf(netbuffer->u.serverinfo.maptitle,
|
||||
33,
|
||||
"%s %s",
|
||||
mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->actnum);
|
||||
else
|
||||
snprintf(netbuffer->u.serverinfo.maptitle,
|
||||
33,
|
||||
"%s",
|
||||
mapheaderinfo[gamemap-1]->lvlttl);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mapheaderinfo[gamemap-1]->actnum[0])
|
||||
{
|
||||
strncat(netbuffer->u.serverinfo.maptitle, " ", sizeof(netbuffer->u.serverinfo.maptitle)-1);
|
||||
strncat(netbuffer->u.serverinfo.maptitle, mapheaderinfo[gamemap-1]->zonttl,
|
||||
sizeof(netbuffer->u.serverinfo.maptitle)-1);
|
||||
if (snprintf(netbuffer->u.serverinfo.maptitle,
|
||||
33,
|
||||
"%s %s %s",
|
||||
mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->zonttl, mapheaderinfo[gamemap-1]->actnum) < 0)
|
||||
{
|
||||
// If there's an encoding error, send UNKNOWN, we accept that the above may be truncated
|
||||
strncpy(netbuffer->u.serverinfo.maptitle, "Unknown", 33);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
netbuffer->u.serverinfo.iszone = 1; // ms and clients will append this themselves
|
||||
if (snprintf(netbuffer->u.serverinfo.maptitle,
|
||||
33,
|
||||
"%s %s",
|
||||
mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->zonttl) < 0)
|
||||
{
|
||||
// If there's an encoding error, send UNKNOWN, we accept that the above may be truncated
|
||||
strncpy(netbuffer->u.serverinfo.maptitle, "Unknown", 33);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mapheaderinfo[gamemap-1]->actnum[0])
|
||||
{
|
||||
strncat(netbuffer->u.serverinfo.maptitle, " ", sizeof(netbuffer->u.serverinfo.maptitle)-1);
|
||||
strncat(netbuffer->u.serverinfo.maptitle, mapheaderinfo[gamemap-1]->actnum,
|
||||
sizeof(netbuffer->u.serverinfo.maptitle)-1);
|
||||
}
|
||||
}
|
||||
else
|
||||
strncpy(netbuffer->u.serverinfo.maptitle, "Unknown", 33);
|
||||
@@ -1755,83 +1722,6 @@ static void SV_SendPlayerInfo(INT32 node)
|
||||
HSendPacket(node, false, 0, sizeof(plrinfo) * MSCOMPAT_MAXPLAYERS);
|
||||
}
|
||||
|
||||
static void SV_SendMapIcon(INT32 node)
|
||||
{
|
||||
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||
|
||||
const char *map = va("%sP", G_BuildMapName(gamemap));
|
||||
if (!W_LumpExists(map) || (mapheaderinfo[gamemap-1]->menuflags & LF2_HIDEINMENU))
|
||||
{
|
||||
// send an empty icon to tell the client there is no map icon
|
||||
netbuffer->packettype = PT_MAPICON;
|
||||
UINT8 *icondata = netbuffer->u.mapicondata;
|
||||
WRITEUINT8(icondata, 0x80);
|
||||
HSendPacket(node, false, 0, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
patch_t *current_map = W_CachePatchName(map, PU_CACHE);
|
||||
if (current_map->width != MAP_ICON_WIDTH || current_map->height != MAP_ICON_HEIGHT)
|
||||
{
|
||||
// we only support 160x100 for now
|
||||
netbuffer->packettype = PT_MAPICON;
|
||||
UINT8 *icondata = netbuffer->u.mapicondata;
|
||||
WRITEUINT8(icondata, 0x80);
|
||||
HSendPacket(node, false, 0, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
UINT8 *data = Z_Malloc(2 * current_map->width * current_map->height, PU_STATIC, NULL);
|
||||
UINT8 *pixeldata = data + current_map->width * current_map->height;
|
||||
|
||||
R_PatchToPixels(current_map, pixeldata);
|
||||
|
||||
z_stream stream;
|
||||
stream.zalloc = NULL;
|
||||
stream.zfree = NULL;
|
||||
stream.opaque = NULL;
|
||||
if (deflateInit(&stream, Z_DEFAULT_COMPRESSION) != Z_OK)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, "Cannot compress map icon, not enough memory\n");
|
||||
Z_Free(data);
|
||||
return;
|
||||
}
|
||||
|
||||
stream.next_in = pixeldata;
|
||||
stream.avail_in = current_map->width * current_map->height;
|
||||
stream.next_out = data;
|
||||
stream.avail_out = current_map->width * current_map->height;
|
||||
if (deflate(&stream, Z_FINISH) != Z_STREAM_END)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, "Cannot compress map icon, error occured during compression\n");
|
||||
deflateEnd(&stream);
|
||||
Z_Free(data);
|
||||
return;
|
||||
}
|
||||
size_t count = stream.total_out;
|
||||
deflateEnd(&stream);
|
||||
|
||||
size_t index = 0;
|
||||
|
||||
for (size_t i = 0; i < count; i += MAXPACKETLENGTH-BASEPACKETSIZE-1)
|
||||
{
|
||||
size_t size = min(MAXPACKETLENGTH-BASEPACKETSIZE-1, count-i);
|
||||
|
||||
UINT8 *icondata = netbuffer->u.mapicondata;
|
||||
netbuffer->packettype = PT_MAPICON;
|
||||
|
||||
if (count-i <= MAXPACKETLENGTH-BASEPACKETSIZE-1)
|
||||
WRITEUINT8(icondata, 0x80 | index);
|
||||
else
|
||||
WRITEUINT8(icondata, index);
|
||||
index++;
|
||||
|
||||
WRITEMEM(icondata, &data[i], size);
|
||||
HSendPacket(node, false, 0, size + 1);
|
||||
}
|
||||
Z_Free(data);
|
||||
}
|
||||
|
||||
/** Sends a PT_SERVERCFG packet
|
||||
*
|
||||
* \param node The destination
|
||||
@@ -2814,26 +2704,9 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
|
||||
if (cl_mode == CL_VIEWSERVER)
|
||||
{
|
||||
if (key == KEY_ENTER || key == KEY_JOY1)
|
||||
{
|
||||
cl_mode = CL_CHECKFILES;
|
||||
if (map_icon != NULL)
|
||||
Patch_Free(map_icon);
|
||||
map_icon = NULL;
|
||||
if (map_icon_data != NULL)
|
||||
Z_Free(map_icon_data);
|
||||
map_icon_data = NULL;
|
||||
}
|
||||
else if (key == KEY_ESCAPE || key == KEY_JOY1+1)
|
||||
{
|
||||
cl_mode = CL_ABORTED;
|
||||
if (map_icon != NULL)
|
||||
Patch_Free(map_icon);
|
||||
map_icon = NULL;
|
||||
if (map_icon_data != NULL)
|
||||
Z_Free(map_icon_data);
|
||||
map_icon_data = NULL;
|
||||
map_icon_request_count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Only ESC and non-keyboard keys abort connection
|
||||
@@ -2949,17 +2822,6 @@ static void CL_ConnectToServer(void)
|
||||
serverlist[i].info.version, serverlist[i].info.subversion);
|
||||
}
|
||||
SL_ClearServerList(servernode);
|
||||
|
||||
if (map_icon_data != NULL)
|
||||
Z_Free(map_icon_data);
|
||||
if (map_icon != NULL)
|
||||
Patch_Free(map_icon);
|
||||
map_icon_data = Z_Malloc(MAP_ICON_WIDTH * MAP_ICON_HEIGHT, PU_CACHE, NULL);
|
||||
map_icon_index = 0;
|
||||
map_icon_needed = 0xff;
|
||||
map_icon_read = 0;
|
||||
map_icon_missing = 0xffffffff;
|
||||
map_icon_last_request = I_GetTime();
|
||||
#endif
|
||||
|
||||
do
|
||||
@@ -4844,10 +4706,6 @@ static void HandleConnect(SINT8 node)
|
||||
if (playernode[i] != UINT8_MAX) // We use this to count players because it is affected by SV_AddWaitingPlayers when more than one client joins on the same tic, unlike playeringame and D_NumPlayers. UINT8_MAX denotes no node for that player
|
||||
connectedplayers++;
|
||||
|
||||
#ifdef SATURNJOIN
|
||||
const boolean issaturn = (((doomcom->datalength) == sizeof(clientconfig_pak)) && netbuffer->u.clientcfg.issaturn == ISSATURN); // Check the packet lenght to skip potential garbo data!
|
||||
#endif
|
||||
|
||||
if (bannednode && bannednode[node].banid != SIZE_MAX)
|
||||
{
|
||||
const char *reason = NULL;
|
||||
@@ -4901,7 +4759,7 @@ static void HandleConnect(SINT8 node)
|
||||
SV_SendRefuse(node, va(M_GetText("Different SRB2Kart versions cannot\nplay a netgame!\n(server version %d.%d)"), VERSION, SUBVERSION));
|
||||
}
|
||||
#ifdef SATURNJOIN
|
||||
else if (((!cv_allownewplayer.value && !issaturn) || (!cv_allownewsaturnplayer.value && issaturn)) && node)
|
||||
else if ((!cv_allownewplayer.value && node && netbuffer->u.clientcfg.issaturn != ISSATURN) || (!cv_allownewsaturnplayer.value && node && netbuffer->u.clientcfg.issaturn == ISSATURN))
|
||||
#else
|
||||
else if (!cv_allownewplayer.value && node)
|
||||
#endif
|
||||
@@ -4929,15 +4787,16 @@ static void HandleConnect(SINT8 node)
|
||||
#ifndef NONET
|
||||
boolean newnode = false;
|
||||
#endif
|
||||
|
||||
// client authorised to join
|
||||
nodewaiting[node] = (UINT8)(netbuffer->u.clientcfg.localplayers - playerpernode[node]);
|
||||
|
||||
if (!nodeingame[node])
|
||||
{
|
||||
gamestate_t backupstate = gamestate;
|
||||
#ifndef NONET
|
||||
newnode = true;
|
||||
#endif
|
||||
|
||||
SV_AddNode(node);
|
||||
|
||||
/// \note Wait what???
|
||||
@@ -4959,14 +4818,12 @@ static void HandleConnect(SINT8 node)
|
||||
/// \todo fix this !!!
|
||||
return; // restart the while
|
||||
}
|
||||
|
||||
SV_SendServerInfo(node, 0); // Dunno if 0 time is good idea
|
||||
//if (gamestate != GS_LEVEL) // GS_INTERMISSION, etc?
|
||||
// SV_SendPlayerConfigs(node); // send bare minimum player info
|
||||
G_SetGamestate(backupstate);
|
||||
DEBFILE("new node joined\n");
|
||||
}
|
||||
|
||||
#ifdef JOININGAME
|
||||
if (nodewaiting[node])
|
||||
{
|
||||
@@ -4975,7 +4832,6 @@ static void HandleConnect(SINT8 node)
|
||||
SV_SendSaveGame(node, false); // send a complete game state
|
||||
DEBFILE("send savegame\n");
|
||||
}
|
||||
|
||||
SV_AddWaitingPlayers();
|
||||
}
|
||||
#else
|
||||
@@ -5015,6 +4871,17 @@ static void HandleTimeout(SINT8 node)
|
||||
M_StartMessage(M_GetText("Server Timeout\n\nPress Esc\n"), NULL, MM_NOTHING);
|
||||
}
|
||||
|
||||
// Helper function for packets that should only be sent by the server
|
||||
// If it is NOT from the server, bail out and close the connection!
|
||||
static boolean ServerOnly(SINT8 node)
|
||||
{
|
||||
if (node == servernode)
|
||||
return false;
|
||||
|
||||
Net_CloseConnection(node);
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifndef NONET
|
||||
/** Called when a PT_SERVERINFO packet is received
|
||||
*
|
||||
@@ -5054,115 +4921,6 @@ static void HandlePlayerInfo(void)
|
||||
playerinfo[i] = netbuffer->u.playerinfo[i];
|
||||
}
|
||||
|
||||
// Helper function for packets that should only be sent by the server
|
||||
// If it is NOT from the server, bail out and close the connection!
|
||||
static boolean ServerOnly(SINT8 node)
|
||||
{
|
||||
if (node == servernode)
|
||||
return false;
|
||||
|
||||
Net_CloseConnection(node);
|
||||
return true;
|
||||
}
|
||||
|
||||
static void PT_MapIcon(void)
|
||||
{
|
||||
if (map_icon_data == NULL)
|
||||
return;
|
||||
|
||||
if (ServerOnly(doomcom->remotenode))
|
||||
return;
|
||||
|
||||
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||
|
||||
UINT8 *icondata = netbuffer->u.mapicondata;
|
||||
|
||||
map_icon_last_request = I_GetTime();
|
||||
map_icon_request_count = 0;
|
||||
|
||||
UINT8 index = READUINT8(icondata);
|
||||
if (index & 0x80)
|
||||
map_icon_needed = (index & 0x7f) + 1;
|
||||
index &= 0x7f;
|
||||
|
||||
// check if we already got this fragment
|
||||
if (map_icon_missing & ((UINT32)1 << index))
|
||||
{
|
||||
map_icon_missing &= ~((UINT32)1 << index);
|
||||
INT32 offset = index * (MAXPACKETLENGTH-BASEPACKETSIZE-1);
|
||||
if (offset + doomcom->datalength-1 > MAP_ICON_WIDTH * MAP_ICON_HEIGHT)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, "Excess amount of data for map icon (expected %d, got %d)\n", MAP_ICON_WIDTH * MAP_ICON_HEIGHT, offset + doomcom->datalength-1);
|
||||
Z_Free(map_icon_data);
|
||||
map_icon_data = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
READMEM(icondata, &map_icon_data[offset], doomcom->datalength-1);
|
||||
map_icon_read += doomcom->datalength-1;
|
||||
map_icon_index++;
|
||||
}
|
||||
|
||||
if (map_icon_index >= map_icon_needed)
|
||||
{
|
||||
if (map_icon_read == 0)
|
||||
{
|
||||
// map has no icon
|
||||
Z_Free(map_icon_data);
|
||||
map_icon_data = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
UINT8 *data = Z_Malloc(MAP_ICON_WIDTH * MAP_ICON_HEIGHT, PU_STATIC, NULL);
|
||||
z_stream stream;
|
||||
stream.zalloc = NULL;
|
||||
stream.zfree = NULL;
|
||||
stream.opaque = NULL;
|
||||
stream.next_in = map_icon_data;
|
||||
stream.avail_in = map_icon_read;
|
||||
if (inflateInit(&stream) != Z_OK)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, "Cannot decompress map icon, not enough memory\n");
|
||||
Z_Free(data);
|
||||
Z_Free(map_icon_data);
|
||||
map_icon_data = NULL;
|
||||
return;
|
||||
}
|
||||
stream.next_out = data;
|
||||
stream.avail_out = MAP_ICON_WIDTH * MAP_ICON_HEIGHT;
|
||||
if (inflate(&stream, Z_FINISH) != Z_STREAM_END)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, "Failed to decompress map icon, map icon is invalid or corrupted\n");
|
||||
deflateEnd(&stream);
|
||||
Z_Free(data);
|
||||
Z_Free(map_icon_data);
|
||||
map_icon_data = NULL;
|
||||
return;
|
||||
}
|
||||
inflateEnd(&stream);
|
||||
Z_Free(map_icon_data);
|
||||
map_icon_data = NULL;
|
||||
|
||||
if (stream.total_out > MAP_ICON_WIDTH * MAP_ICON_HEIGHT)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, "Excess amount of data for map icon (expected %d, got %ld)\n", MAP_ICON_WIDTH * MAP_ICON_HEIGHT, stream.total_out);
|
||||
Z_Free(data);
|
||||
return;
|
||||
}
|
||||
else if (stream.total_out < MAP_ICON_WIDTH * MAP_ICON_HEIGHT)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, "Insufficient amount of data for map icon (expected %d, got %ld)\n", MAP_ICON_WIDTH * MAP_ICON_HEIGHT, stream.total_out);
|
||||
Z_Free(data);
|
||||
return;
|
||||
}
|
||||
|
||||
//map_icon = Patch_CreateFromData(MAP_ICON_WIDTH, MAP_ICON_HEIGHT, data);
|
||||
map_icon = (patch_t *)R_PixelsToPatch(data, MAP_ICON_WIDTH, MAP_ICON_HEIGHT, 0, 0, NULL);
|
||||
|
||||
Z_Free(data);
|
||||
}
|
||||
}
|
||||
|
||||
static void PT_TellFilesNeeded(SINT8 node)
|
||||
{
|
||||
if (server && serverrunning)
|
||||
@@ -5211,18 +4969,11 @@ static void PT_AskInfo(SINT8 node)
|
||||
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||
SV_SendServerInfo(node, (tic_t)LONG(netbuffer->u.askinfo.time));
|
||||
SV_SendPlayerInfo(node); // Send extra info
|
||||
//SV_SendMapIcon(node); // idk i dont think we need this here
|
||||
}
|
||||
|
||||
Net_CloseConnection(node);
|
||||
}
|
||||
|
||||
static void PT_NeedMapIcon(SINT8 node)
|
||||
{
|
||||
SV_SendMapIcon(node);
|
||||
Net_CloseConnection(node);
|
||||
}
|
||||
|
||||
// Negative response of client join request
|
||||
static void PT_ServerRefuse(SINT8 node)
|
||||
{
|
||||
@@ -5483,12 +5234,6 @@ static void HandlePacketFromAwayNode(SINT8 node)
|
||||
case PT_PLAYERINFO:
|
||||
HandlePlayerInfo();
|
||||
break;
|
||||
case PT_MAPICON:
|
||||
PT_MapIcon();
|
||||
break;
|
||||
case PT_NEEDMAPICON:
|
||||
PT_NeedMapIcon(node);
|
||||
break;
|
||||
case PT_SERVERTICS:
|
||||
// Do not remove my own server (we have just get a out of order packet)
|
||||
if (node == servernode)
|
||||
@@ -5777,10 +5522,10 @@ static void PT_TextCmd(INT32 netconsole, SINT8 node)
|
||||
|
||||
// ignore if the textcmd size var is actually larger than it should be
|
||||
// BASEPACKETSIZE + 1 (for size) + textcmd[0] should == datalength
|
||||
if (netbuffer->u.textcmd[0] > (size_t)doomcom->datalength-1)
|
||||
if (netbuffer->u.textcmd[0] > (size_t)doomcom->datalength-BASEPACKETSIZE-1)
|
||||
{
|
||||
DEBFILE(va("GetPacket: Bad Textcmd packet size! (expected %d, actual %s, node %u, player %d)\n",
|
||||
netbuffer->u.textcmd[0], sizeu1((size_t)doomcom->datalength-1),
|
||||
netbuffer->u.textcmd[0], sizeu1((size_t)doomcom->datalength-BASEPACKETSIZE-1),
|
||||
node, netconsole));
|
||||
Net_UnAcknowledgePacket(node);
|
||||
return;
|
||||
@@ -5821,6 +5566,7 @@ static void PT_TextCmd(INT32 netconsole, SINT8 node)
|
||||
|
||||
static void PT_ClientQuit(INT32 netconsole, SINT8 node)
|
||||
{
|
||||
|
||||
if (client)
|
||||
return;
|
||||
|
||||
@@ -7236,7 +6982,6 @@ void NetUpdate(void)
|
||||
#endif
|
||||
CON_Ticker();
|
||||
}
|
||||
|
||||
SV_FileSendTicker();
|
||||
}
|
||||
|
||||
|
||||
+1
-3
@@ -120,8 +120,6 @@ typedef enum
|
||||
PT_ISSATURN, // Saturn specific identifier packet
|
||||
#endif
|
||||
|
||||
PT_MAPICON, // Send map image icon (gamespy).
|
||||
PT_NEEDMAPICON, // Request missed map icon (gamespy).
|
||||
NUMPACKETTYPE
|
||||
} packettype_t;
|
||||
|
||||
@@ -515,7 +513,6 @@ typedef struct
|
||||
INT32 filesneedednum; // 4 bytes
|
||||
filesneededconfig_pak filesneededcfg; // ??? bytes
|
||||
UINT32 pingtable[MAXPLAYERS+1]; // 68 bytes
|
||||
UINT8 mapicondata[0];
|
||||
} u; // This is needed to pack diff packet types data together
|
||||
} ATTRPACK doomdata_t;
|
||||
|
||||
@@ -567,6 +564,7 @@ typedef enum
|
||||
KR_TIMEOUT, //Connection Timeout
|
||||
KR_BAN, //Banned by server
|
||||
KR_LEAVE, //Quit the game
|
||||
|
||||
} kickreason_t;
|
||||
|
||||
/* the max number of name changes in some time period */
|
||||
|
||||
+34
-9
@@ -121,8 +121,11 @@ INT32 postimgparam[MAXSPLITSCREENPLAYERS];
|
||||
// These variables are only true if
|
||||
// whether the respective sound system is disabled
|
||||
// or they're init'ed, but the player just toggled them
|
||||
#ifndef NO_MIDI
|
||||
boolean midi_disabled = false;
|
||||
#endif
|
||||
boolean sound_disabled = false;
|
||||
boolean music_disabled = false;
|
||||
boolean digital_disabled = false;
|
||||
|
||||
#ifdef DEBUGFILE
|
||||
INT32 debugload = 0;
|
||||
@@ -933,6 +936,7 @@ void D_SRB2Loop(void)
|
||||
Discord_RunCallbacks();
|
||||
}
|
||||
#endif
|
||||
|
||||
// Fully completed frame made.
|
||||
finishprecise = I_GetPreciseTime();
|
||||
|
||||
@@ -970,7 +974,6 @@ void D_SRB2Loop(void)
|
||||
I_SleepDuration(capbudget - elapsed);
|
||||
}
|
||||
}
|
||||
|
||||
// Capture the time once more to get the real delta time.
|
||||
finishprecise = I_GetPreciseTime();
|
||||
deltasecs = (double)((INT64)(finishprecise - enterprecise)) / I_GetPrecisePrecision();
|
||||
@@ -1986,23 +1989,45 @@ void D_SRB2Main(void)
|
||||
if (dedicated)
|
||||
{
|
||||
sound_disabled = true;
|
||||
music_disabled = true;
|
||||
digital_disabled = true;
|
||||
#ifndef NO_MIDI
|
||||
midi_disabled = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (M_CheckParm("-noaudio")) // combines -nosound and -nomusic
|
||||
{
|
||||
sound_disabled = true;
|
||||
music_disabled = true;
|
||||
digital_disabled = true;
|
||||
#ifndef NO_MIDI
|
||||
midi_disabled = true;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
if (M_CheckParm("-nosound"))
|
||||
sound_disabled = true;
|
||||
if (M_CheckParm("-nomusic"))
|
||||
music_disabled = true;
|
||||
if (M_CheckParm("-nomusic")) // combines -nomidimusic and -nodigmusic
|
||||
{
|
||||
digital_disabled = true;
|
||||
#ifndef NO_MIDI
|
||||
midi_disabled = true;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef NO_MIDI
|
||||
if (M_CheckParm("-nomidimusic"))
|
||||
midi_disabled = true; // WARNING: DOS version initmusic in I_StartupSound
|
||||
#endif
|
||||
if (M_CheckParm("-nodigmusic"))
|
||||
digital_disabled = true; // WARNING: DOS version initmusic in I_StartupSound
|
||||
}
|
||||
}
|
||||
|
||||
if (!(sound_disabled && music_disabled))
|
||||
if (!( sound_disabled && digital_disabled
|
||||
#ifndef NO_MIDI
|
||||
&& midi_disabled
|
||||
#endif
|
||||
))
|
||||
{
|
||||
CONS_Printf("S_InitSfxChannels(): Setting up sound channels.\n");
|
||||
I_StartupSound();
|
||||
|
||||
@@ -1201,7 +1201,6 @@ boolean HGetPacket(void)
|
||||
GotAcks();
|
||||
continue;
|
||||
}
|
||||
doomcom->datalength -= BASEPACKETSIZE;
|
||||
break;
|
||||
}
|
||||
#endif // ifndef NONET
|
||||
|
||||
+1
-13
@@ -937,7 +937,6 @@ void D_RegisterClientCommands(void)
|
||||
CV_RegisterVar(&cv_consolechat);
|
||||
CV_RegisterVar(&cv_chatnotifications);
|
||||
CV_RegisterVar(&cv_chatbacktint);
|
||||
CV_RegisterVar(&cv_chatcentertext);
|
||||
CV_RegisterVar(&cv_songcredits);
|
||||
CV_RegisterVar(&cv_showfreeplay);
|
||||
CV_RegisterVar(&cv_skinselectspin);
|
||||
@@ -2506,14 +2505,6 @@ void D_SetupVote(void)
|
||||
UINT8 gt = (cv_kartgametypepreference.value == -1) ? gametype : cv_kartgametypepreference.value;
|
||||
UINT8 secondgt = G_SometimesGetDifferentGametype(gt);
|
||||
INT16 votebuffer[4] = {-1,-1,-1,0};
|
||||
INT16 luamaps[4] = {0, 0, 0, 0};
|
||||
|
||||
LUA_HookSetupVote(luamaps, sizeof(luamaps)/sizeof(luamaps[0]), gt, secondgt);
|
||||
|
||||
// Correct secondgt if needed
|
||||
UINT8 typeoflevel = mapheaderinfo[luamaps[2]-1]->typeoflevel;
|
||||
if (luamaps[2] && (typeoflevel & G_TOLFlag(secondgt&(~0x80))) == 0)
|
||||
secondgt = ((typeoflevel & TOL_RACE) ? GT_RACE : GT_MATCH)|(secondgt&0x80);
|
||||
|
||||
if (cv_kartencore.value && gt == GT_RACE)
|
||||
WRITEUINT8(p, (gt|0x80));
|
||||
@@ -2522,13 +2513,10 @@ void D_SetupVote(void)
|
||||
WRITEUINT8(p, secondgt);
|
||||
secondgt &= ~0x80;
|
||||
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
UINT16 m;
|
||||
if (luamaps[i])
|
||||
m = luamaps[i]-1;
|
||||
else if (i == 2) // sometimes a different gametype
|
||||
if (i == 2) // sometimes a different gametype
|
||||
m = G_RandMap(G_TOLFlag(secondgt), prevmap, false, 0, true, votebuffer);
|
||||
else if (i >= 3) // unknown-random and force-unknown MAP HELL
|
||||
m = G_RandMap(G_TOLFlag(gt), prevmap, false, (i-2), (i < 4), votebuffer);
|
||||
|
||||
@@ -69,11 +69,13 @@ void I_ShutdownSound(void){}
|
||||
|
||||
\return sfx handle
|
||||
*/
|
||||
INT32 I_StartSound(sfxenum_t id, UINT8 vol, UINT8 sep, INT32 channel)
|
||||
INT32 I_StartSound(sfxenum_t id, UINT8 vol, UINT8 sep, UINT8 pitch, UINT8 priority, INT32 channel)
|
||||
{
|
||||
(void)id;
|
||||
(void)vol;
|
||||
(void)sep;
|
||||
(void)pitch;
|
||||
(void)priority;
|
||||
(void)channel;
|
||||
return 0;
|
||||
}
|
||||
@@ -114,11 +116,12 @@ boolean I_SoundIsPlaying(INT32 handle)
|
||||
|
||||
\return void
|
||||
*/
|
||||
void I_UpdateSoundParams(INT32 handle, UINT8 vol, UINT8 sep)
|
||||
void I_UpdateSoundParams(INT32 handle, UINT8 vol, UINT8 sep, UINT8 pitch)
|
||||
{
|
||||
(void)handle;
|
||||
(void)vol;
|
||||
(void)sep;
|
||||
(void)pitch;
|
||||
}
|
||||
|
||||
/** \brief The I_SetSfxVolume function
|
||||
|
||||
+1
-10
@@ -178,9 +178,6 @@ FUNCPRINTF static void deh_warning(const char *first, ...)
|
||||
else
|
||||
CONS_Alert(CONS_WARNING, "Line %u: %s\n", dbg_line, buf);
|
||||
|
||||
if (dbg_line != -1 && (M_CheckParm("-strict") || M_CheckParm("-strict-soc")))
|
||||
I_Error("deh_warning: %s", buf);
|
||||
|
||||
deh_num_warning++;
|
||||
|
||||
Z_Free(buf);
|
||||
@@ -2858,7 +2855,7 @@ static void DEH_LoadDehackedFile(MYFILE *f, UINT16 wad)
|
||||
dbg_line = -1; // start at -1 so the first line is 0.
|
||||
while (!myfeof(f))
|
||||
{
|
||||
char origpos[256];
|
||||
char origpos[128];
|
||||
INT32 size = 0;
|
||||
char *traverse;
|
||||
|
||||
@@ -2874,12 +2871,6 @@ static void DEH_LoadDehackedFile(MYFILE *f, UINT16 wad)
|
||||
size++;
|
||||
}
|
||||
|
||||
if (size > (int)sizeof(origpos))
|
||||
{
|
||||
deh_warning("Line is too long");
|
||||
size = sizeof(origpos)-1;
|
||||
}
|
||||
|
||||
strncpy(origpos, s, size);
|
||||
origpos[size] = '\0';
|
||||
|
||||
|
||||
+1
-2
@@ -650,8 +650,7 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
|
||||
#define NOCLIPCAM
|
||||
|
||||
/// SRB2Kart: MIDI support is shitty and busted and we don't want it, lets throw it behind a define
|
||||
// yall didnt properly disable it so it always worked lol (:
|
||||
//#define NO_MIDI
|
||||
#define NO_MIDI
|
||||
|
||||
/// Sprite rotation
|
||||
#define ROTSPRITE
|
||||
|
||||
+6
-1
@@ -102,8 +102,13 @@ extern boolean forceresetplayers, deferencoremode;
|
||||
// Internal parameters for sound rendering.
|
||||
// ========================================
|
||||
|
||||
#ifdef NO_MIDI
|
||||
#define midi_disabled true
|
||||
#else
|
||||
extern boolean midi_disabled;
|
||||
#endif
|
||||
extern boolean sound_disabled;
|
||||
extern boolean music_disabled;
|
||||
extern boolean digital_disabled;
|
||||
|
||||
// =========================
|
||||
// Status flags for refresh.
|
||||
|
||||
+3
-5
@@ -310,8 +310,6 @@ consvar_t cv_chatbacktint = {"chatbacktint", "On", CV_SAVE, CV_OnOff, NULL, 0, N
|
||||
static CV_PossibleValue_t consolechat_cons_t[] = {{0, "Window"}, {1, "Console"}, {2, "Window (Hidden)"}, {0, NULL}};
|
||||
consvar_t cv_consolechat = {"chatmode", "Window", CV_SAVE, consolechat_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_chatcentertext = {"chatcentertext", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
// Pause game upon window losing focus
|
||||
consvar_t cv_pauseifunfocused = {"pauseifunfocused", "Yes", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
@@ -885,7 +883,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||
return;
|
||||
|
||||
const UINT8 forplayer = (ssplayer-1);
|
||||
player_t *player = P_GetLocalPlayerForNum(forplayer);
|
||||
player_t *player = ((ssplayer == 1) ? &players[consoleplayer] : &players[displayplayers[forplayer]]);
|
||||
|
||||
camera_t *thiscam = &camera[forplayer];
|
||||
const boolean freecam = camera[forplayer].freecam;
|
||||
@@ -1795,11 +1793,11 @@ void G_Ticker(boolean run)
|
||||
{
|
||||
for (i = 0; i < MAXPLAYERS; i++) // read/write demo and check turbo cheat
|
||||
{
|
||||
cmd = &players[i].cmd;
|
||||
|
||||
if (!playeringame[i])
|
||||
continue;
|
||||
|
||||
cmd = &players[i].cmd;
|
||||
|
||||
//@TODO all this throwdir stuff shouldn't be here! But it stays for now to maintain 1.0.4 compat...
|
||||
// Remove for 1.1!
|
||||
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ extern tic_t timeinmap; // Ticker for time spent in level (used for levelcard di
|
||||
extern INT16 rw_maximums[NUM_WEAPONS];
|
||||
|
||||
// used in game menu
|
||||
extern consvar_t cv_chatwidth, cv_chatnotifications, cv_chatheight, cv_chattime, cv_consolechat, cv_chatbacktint, cv_chatspamprotection, cv_chatcentertext/*, cv_compactscoreboard*/;
|
||||
extern consvar_t cv_chatwidth, cv_chatnotifications, cv_chatheight, cv_chattime, cv_consolechat, cv_chatbacktint, cv_chatspamprotection/*, cv_compactscoreboard*/;
|
||||
extern consvar_t cv_songcredits;
|
||||
extern consvar_t cv_showfreeplay;
|
||||
extern consvar_t cv_growmusic, cv_supermusic;
|
||||
|
||||
@@ -99,8 +99,7 @@ void HWR_ProcessPolygon(FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPt
|
||||
polygonArrayAllocSize *= 2;
|
||||
polygonArray = realloc(polygonArray, polygonArrayAllocSize * sizeof(PolygonArrayEntry));
|
||||
// also need to redo the index array, dont need to copy it though
|
||||
free(polygonArraySorted);
|
||||
polygonArraySorted = malloc(polygonArrayAllocSize * sizeof(PolygonArrayEntry *));
|
||||
polygonArraySorted = realloc(polygonArraySorted, polygonArrayAllocSize * sizeof(PolygonArrayEntry*));
|
||||
}
|
||||
|
||||
while (unsortedVertexArraySize + (int)iNumPts > unsortedVertexArrayAllocSize)
|
||||
|
||||
+84
-52
@@ -328,7 +328,7 @@ static void HWR_GenerateTexture(INT32 texnum, GLMapTexture_t *gltex, boolean noe
|
||||
gltex->mipmap.format = textureformat;
|
||||
|
||||
// hack the Legacy skies..
|
||||
if (UNLIKELY(memcmp(texture->name, "SKY", 3) == 0 &&
|
||||
if (UNLIKELY(strncmp(texture->name, "SKY", 3) == 0 &&
|
||||
(texture->name[4] == 0 || texture->name[5] == 0)))
|
||||
{
|
||||
skyspecial = true;
|
||||
@@ -600,6 +600,7 @@ void HWR_FreeMapTextures(void)
|
||||
|
||||
static void HWR_PrecacheLevelFlats(void)
|
||||
{
|
||||
levelflat_t levelflat;
|
||||
lumpnum_t lump;
|
||||
size_t i, j;
|
||||
INT32 k;
|
||||
@@ -613,22 +614,28 @@ static void HWR_PrecacheLevelFlats(void)
|
||||
{
|
||||
sector_t *sec = §ors[i];
|
||||
|
||||
// sector checked already?
|
||||
if (sec->validcount == validcount)
|
||||
continue;
|
||||
|
||||
sec->validcount = validcount;
|
||||
|
||||
// gotta check sector floor and ceiling
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
const boolean ceiling = (j == 0);
|
||||
const INT32 pic = ceiling ? sec->ceilingpic : sec->floorpic;
|
||||
INT32 pic = ceiling ? sec->ceilingpic : sec->floorpic;
|
||||
|
||||
const levelflat_t *levelflat = &levelflats[pic];
|
||||
levelflat = levelflats[pic];
|
||||
|
||||
lump = levelflat->lumpnum;
|
||||
lump = levelflat.lumpnum;
|
||||
HWR_GetFlat(lump, R_NoEncore(sec, ceiling));
|
||||
|
||||
if (levelflat->speed) // it is an animated flat
|
||||
if (levelflat.speed) // it is an animated flat
|
||||
{
|
||||
for (k = 1; k < levelflat->numpics; k++)
|
||||
for (k = 1; k < levelflat.numpics; k++)
|
||||
{
|
||||
lump = levelflat->baselumpnum + k;
|
||||
lump = levelflat.baselumpnum + k;
|
||||
HWR_GetFlat(lump, R_NoEncore(sec, ceiling));
|
||||
}
|
||||
}
|
||||
@@ -642,18 +649,18 @@ static void HWR_PrecacheLevelFlats(void)
|
||||
// just load every flat in the level
|
||||
for (i = 0; i < numlevelflats; i++)
|
||||
{
|
||||
const levelflat_t *levelflat = &levelflats[i];
|
||||
lump = levelflat->lumpnum;
|
||||
levelflat = levelflats[i];
|
||||
lump = levelflat.lumpnum;
|
||||
|
||||
HWR_GetFlat(lump, false);
|
||||
|
||||
if (!levelflat->speed) // is it an animated flat ?
|
||||
continue;
|
||||
|
||||
for (k = 1; k < levelflat->numpics; k++)
|
||||
if (levelflat.speed) // it is an animated flat
|
||||
{
|
||||
lump = levelflat->baselumpnum + k;
|
||||
HWR_GetFlat(lump, false);
|
||||
for (k = 1; k < levelflat.numpics; k++)
|
||||
{
|
||||
lump = levelflat.baselumpnum + k;
|
||||
HWR_GetFlat(lump, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -663,55 +670,52 @@ static void HWR_PrecacheLevelTextures(void)
|
||||
{
|
||||
char *texturepresent;
|
||||
anim_t *anim;
|
||||
size_t i, j, f;
|
||||
size_t i, j;
|
||||
INT32 h;
|
||||
|
||||
texturepresent = calloc(numtextures, sizeof (*texturepresent));
|
||||
if (texturepresent == NULL)
|
||||
I_Error("%s: Out of memory looking up textures", "HWR_PrecacheLevel");
|
||||
|
||||
// Sky texture is always present.
|
||||
// Note that F_SKY1 is the name used to indicate a sky floor/ceiling as a flat,
|
||||
// while the sky texture is stored like a wall texture, with a skynum dependent name.
|
||||
texturepresent[skytexture] = 1;
|
||||
HWR_GetTexture(skytexture, false);
|
||||
if (texturepresent == NULL) I_Error("%s: Out of memory looking up textures", "HWR_PrecacheLevel");
|
||||
|
||||
for (i = 0; i < numlines; i++)
|
||||
{
|
||||
const line_t *line = &lines[i];
|
||||
line_t *line = &lines[i];
|
||||
#ifdef GLENCORE
|
||||
const int noencoremap = ((encoremap && (line->flags & ML_TFERLINE)) ? 2 : 1);
|
||||
const int noencoremap = ((line->flags & ML_TFERLINE) ? 2 : 1);
|
||||
#else
|
||||
const int noencoremap = 1;
|
||||
#endif
|
||||
|
||||
// line checked already?
|
||||
if (line->validcount == validcount)
|
||||
continue;
|
||||
|
||||
line->validcount = validcount;
|
||||
|
||||
// two sides
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
// check if single-sided linedef
|
||||
side_t *side = &sides[line->sidenum[j]];
|
||||
|
||||
// Single-side linedef
|
||||
if (line->sidenum[j] == 0xffff)
|
||||
continue;
|
||||
|
||||
const side_t *side = &sides[line->sidenum[j]];
|
||||
const INT32 sidetex[] = {side->toptexture, side->midtexture, side->bottomtexture};
|
||||
|
||||
// gotta check from top to bottom uwu
|
||||
for (f = 0; f < 3; f++)
|
||||
if (side->toptexture >= 0 && side->toptexture < numtextures)
|
||||
{
|
||||
const INT32 texnum = sidetex[f];
|
||||
if (texnum < 0 || texnum >= numtextures || texturepresent[texnum])
|
||||
continue;
|
||||
|
||||
texturepresent[texnum] = 1|noencoremap;
|
||||
|
||||
HWR_GetTexture(texnum, false);
|
||||
#ifdef GLENCORE
|
||||
if (noencoremap & 2)
|
||||
HWR_GetTexture(texnum, true);
|
||||
#endif
|
||||
texturepresent[side->toptexture] = 1|noencoremap;
|
||||
}
|
||||
if (side->midtexture >= 0 && side->midtexture < numtextures)
|
||||
{
|
||||
texturepresent[side->midtexture] = 1|noencoremap;
|
||||
}
|
||||
if (side->bottomtexture >= 0 && side->bottomtexture < numtextures)
|
||||
{
|
||||
texturepresent[side->bottomtexture] = 1|noencoremap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// check for animated textures
|
||||
for (anim = anims; anim < lastanim; anim++)
|
||||
{
|
||||
if (!anim->istexture)
|
||||
@@ -722,21 +726,47 @@ static void HWR_PrecacheLevelTextures(void)
|
||||
if (!texpresent)
|
||||
continue;
|
||||
|
||||
for (h = 1; h < anim->numpics; h++)
|
||||
if (texpresent & 1)
|
||||
{
|
||||
if (texpresent & 1)
|
||||
for (h = 1; h < anim->numpics; h++)
|
||||
{
|
||||
HWR_GetTexture(anim->basepic+h, false);
|
||||
}
|
||||
}
|
||||
#ifdef GLENCORE
|
||||
if (texpresent & 2)
|
||||
if (texpresent & 2)
|
||||
{
|
||||
for (h = 1; h < anim->numpics; h++)
|
||||
{
|
||||
HWR_GetTexture(anim->basepic+h, true);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Sky texture is always present.
|
||||
// Note that F_SKY1 is the name used to indicate a sky floor/ceiling as a flat,
|
||||
// while the sky texture is stored like a wall texture, with a skynum dependent name.
|
||||
texturepresent[skytexture] = 1;
|
||||
|
||||
for (i = 0; i < (unsigned)numtextures; i++)
|
||||
{
|
||||
const char texpresent = texturepresent[i];
|
||||
|
||||
if (!texpresent)
|
||||
continue;
|
||||
|
||||
if (texpresent & 1)
|
||||
{
|
||||
HWR_GetTexture(i, false);
|
||||
}
|
||||
#ifdef GLENCORE
|
||||
if (texpresent & 2)
|
||||
{
|
||||
HWR_GetTexture(i, true);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
free(texturepresent);
|
||||
}
|
||||
|
||||
@@ -745,19 +775,21 @@ static void HWR_PrecacheLevelSprites(void)
|
||||
patch_t *spritepatch;
|
||||
char *spritepresent;
|
||||
size_t i, j, k;
|
||||
lumpnum_t lump;
|
||||
|
||||
thinker_t *th;
|
||||
mobj_t *mo;
|
||||
spriteframe_t *sf;
|
||||
|
||||
spritepresent = calloc(numsprites, sizeof (*spritepresent));
|
||||
if (spritepresent == NULL)
|
||||
I_Error("%s: Out of memory looking up sprites", "HWR_PrecacheLevel");
|
||||
if (spritepresent == NULL) I_Error("%s: Out of memory looking up sprites", "HWR_PrecacheLevel");
|
||||
|
||||
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
||||
{
|
||||
if (th->function != (actionf_p1)P_MobjThinker)
|
||||
continue;
|
||||
|
||||
const mobj_t *mo = (mobj_t *)th;
|
||||
mo = (mobj_t *)th;
|
||||
|
||||
// ogl is weird
|
||||
// for some reason it does not want to preload sprites with colormaps
|
||||
@@ -775,10 +807,10 @@ static void HWR_PrecacheLevelSprites(void)
|
||||
|
||||
for (j = 0; j < sprites[i].numframes; j++)
|
||||
{
|
||||
const spriteframe_t *sf = &sprites[i].spriteframes[j];
|
||||
sf = &sprites[i].spriteframes[j];
|
||||
|
||||
#define cacheang(a) {\
|
||||
const lumpnum_t lump = sf->lumppat[a];\
|
||||
lump = sf->lumppat[a];\
|
||||
spritepatch = (patch_t *)W_CachePatchNum(lump, PU_SPRITE);\
|
||||
if (spritepatch != NULL)\
|
||||
HWR_GetPatch(spritepatch);\
|
||||
|
||||
+30
-27
@@ -378,7 +378,7 @@ void HWR_ObjectLightLevelPost(gl_vissprite_t *spr, const sector_t *sector, INT32
|
||||
fixed_t extralight = R_GetSpriteDirectionalLighting(R_PointToAngle(spr->mobj->x, spr->mobj->y));
|
||||
|
||||
// Less change in contrast in dark sectors
|
||||
extralight = FixedMul(extralight, std::min(std::max(0, *lightlevel), 255) * FRACUNIT / 255);
|
||||
extralight = FixedMul(extralight, CLAMP(*lightlevel, 0, 255) * FRACUNIT / 255);
|
||||
|
||||
// simple OGL approximation
|
||||
fixed_t tr = R_QuickCamDist(spr->mobj->x, spr->mobj->y) << FRACBITS;
|
||||
@@ -459,7 +459,6 @@ void HWR_Lighting(FSurfaceInfo *Surface, INT32 light_level, extracolormap_t *col
|
||||
V_CubeApply(&tint_color.s.red, &tint_color.s.green, &tint_color.s.blue);
|
||||
V_CubeApply(&fade_color.s.red, &fade_color.s.green, &fade_color.s.blue);
|
||||
}
|
||||
|
||||
Surface->PolyColor.rgba = poly_color.rgba;
|
||||
Surface->TintColor.rgba = tint_color.rgba;
|
||||
Surface->FadeColor.rgba = fade_color.rgba;
|
||||
@@ -549,9 +548,9 @@ static void HWR_RenderPlane(subsector_t *subsector, extrasubsector_t *xsub, bool
|
||||
INT32 i;
|
||||
|
||||
float height; // constant y for all points on the convex flat polygon
|
||||
static float flatxref = 0.0f, flatyref = 0.0f;
|
||||
static float fflatsize = 64.0f;
|
||||
static INT32 flatflag = 63;
|
||||
float flatxref, flatyref = 0.0f;
|
||||
float fflatsize = 64.0f;
|
||||
INT32 flatflag = 63;
|
||||
size_t len;
|
||||
|
||||
float tempxsow, tempytow;
|
||||
@@ -1014,10 +1013,10 @@ static void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum,
|
||||
|
||||
float diff;
|
||||
|
||||
const fixed_t v1x = FloatToFixed(wallVerts[0].x);
|
||||
const fixed_t v1y = FloatToFixed(wallVerts[0].z);
|
||||
const fixed_t v2x = FloatToFixed(wallVerts[1].x);
|
||||
const fixed_t v2y = FloatToFixed(wallVerts[1].z);
|
||||
fixed_t v1x = FloatToFixed(wallVerts[0].x);
|
||||
fixed_t v1y = FloatToFixed(wallVerts[0].z);
|
||||
fixed_t v2x = FloatToFixed(wallVerts[1].x);
|
||||
fixed_t v2y = FloatToFixed(wallVerts[1].z);
|
||||
|
||||
const UINT8 alpha = Surf->PolyColor.s.alpha;
|
||||
FUINT lightnum = HWR_CalcWallLight(sector->lightlevel, gl_curline, NULL);
|
||||
@@ -1223,7 +1222,6 @@ static void HWR_DrawSkyWallList(void)
|
||||
|
||||
HWR_SetCurrentTexture(NULL);
|
||||
GL_UnSetShader();
|
||||
|
||||
for (i = 0; i < skyWallVertexArraySize; i++)
|
||||
{
|
||||
GL_DrawPolygon(&surf, skyWallVertexArray + i * 4, 4, PF_Occlude|PF_Invisible|PF_NoTexture|PF_Skydecal);
|
||||
@@ -5306,14 +5304,19 @@ static void HWR_DrawSkyBackground(void)
|
||||
{
|
||||
FTransform dometransform;
|
||||
|
||||
if (drewsky || HWR_IsWireframeMode())
|
||||
if (drewsky)
|
||||
return;
|
||||
|
||||
if (HWR_IsWireframeMode())
|
||||
return;
|
||||
|
||||
GL_SetBlend(PF_Translucent|PF_NoDepthTest|PF_Modulated);
|
||||
|
||||
memcpy(&dometransform, &atransform, sizeof(FTransform));
|
||||
|
||||
dometransform.x = dometransform.y = dometransform.z = 0.0;
|
||||
dometransform.x = 0.0;
|
||||
dometransform.y = 0.0;
|
||||
dometransform.z = 0.0;
|
||||
|
||||
//04/01/2000: Hurdler: added for T&L
|
||||
// It should replace all other gl_viewxxx when finished
|
||||
@@ -5330,7 +5333,6 @@ static void HWR_DrawSkyBackground(void)
|
||||
|
||||
if (HWR_UseShader())
|
||||
GL_SetShader(HWR_GetShaderFromTarget(SHADER_SKY));
|
||||
|
||||
GL_SetTransform(&dometransform);
|
||||
GL_RenderSkyDome(&gl_sky);
|
||||
}
|
||||
@@ -5348,6 +5350,7 @@ static inline void HWR_ClearView(void)
|
||||
GL_ClearBuffer(false, true, true, NULL);
|
||||
}
|
||||
|
||||
|
||||
// -----------------+
|
||||
// HWR_SetViewSize : set projection and scaling values
|
||||
// -----------------+
|
||||
@@ -5578,7 +5581,7 @@ void HWR_RenderViewpoint(gl_portal_t *rootportal, player_t *player, int stencil_
|
||||
drewsky = false;
|
||||
HWR_DrawSkyBackground();
|
||||
HWR_SetStencilState(HWR_STENCIL_NORMAL, 0);
|
||||
GL_ClearBuffer(false, false, true, NULL);// clear skywall markings from the stencil buffer
|
||||
GL_ClearBuffer(false, false, true, 0);// clear skywall markings from the stencil buffer
|
||||
HWR_SetTransform(fpov);// restore transform
|
||||
}
|
||||
}
|
||||
@@ -5697,7 +5700,13 @@ void HWR_RenderPlayerView(void)
|
||||
// Clear the color buffer, stops HOMs. Also seems to fix the skybox issue on Intel GPUs.
|
||||
if (viewssnum == 0) // Only do it if it's the first screen being rendered
|
||||
{
|
||||
static FRGBAFloat ClearColor = {0.0f, 0.0f, 0.0f, 1.0f};
|
||||
FRGBAFloat ClearColor;
|
||||
|
||||
ClearColor.red = 0.0f;
|
||||
ClearColor.green = 0.0f;
|
||||
ClearColor.blue = 0.0f;
|
||||
ClearColor.alpha = 1.0f;
|
||||
|
||||
GL_ClearBuffer(true, false, false, &ClearColor);
|
||||
}
|
||||
|
||||
@@ -5706,19 +5715,13 @@ void HWR_RenderPlayerView(void)
|
||||
if (cv_ripplewater.value)
|
||||
GL_SetShaderInfo(HWD_SHADERINFO_LEVELTIME, (INT32)leveltime); // The water surface shader needs the leveltime.
|
||||
|
||||
if (cv_glmdls.value)
|
||||
{
|
||||
if (maplighting.directional)
|
||||
{
|
||||
const angle_t light_angle = maplighting.angle - viewangle + ANGLE_90; // I fucking hate OGL's coordinate system
|
||||
GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_X, FINECOSINE(light_angle >> ANGLETOFINESHIFT));
|
||||
GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_Y, 0);
|
||||
GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_Z, -FINESINE(light_angle >> ANGLETOFINESHIFT));
|
||||
}
|
||||
const angle_t light_angle = maplighting.angle - viewangle + ANGLE_90; // I fucking hate OGL's coordinate system
|
||||
GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_X, FINECOSINE(light_angle >> ANGLETOFINESHIFT));
|
||||
GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_Y, 0);
|
||||
GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_Z, -FINESINE(light_angle >> ANGLETOFINESHIFT));
|
||||
|
||||
GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_CONTRAST, maplighting.contrast);
|
||||
GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_BACKLIGHT, maplighting.backlight);
|
||||
}
|
||||
GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_CONTRAST, maplighting.contrast);
|
||||
GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_BACKLIGHT, maplighting.backlight);
|
||||
}
|
||||
|
||||
if (viewssnum > 3)
|
||||
|
||||
@@ -35,7 +35,7 @@ static struct {
|
||||
// Sprite shader
|
||||
{GLSL_DEFAULT_VERTEX_SHADER, GLSL_WALL_FRAGMENT_SHADER},
|
||||
|
||||
// Model shader + diffuse lighting from above
|
||||
// Model shader
|
||||
{GLSL_MODEL_LIGHTING_VERTEX_SHADER, GLSL_WALL_FRAGMENT_SHADER},
|
||||
|
||||
// Water shader
|
||||
|
||||
@@ -2112,7 +2112,7 @@ static void GL_Shader_SetUniforms(FSurfaceInfo *Surface, GLRGBAFloat *poly, GLRG
|
||||
UNIFORM_1(shader->uniforms[gluniform_lighting], (GLfloat)Surface->LightInfo.light_level, pglUniform1f);
|
||||
UNIFORM_1(shader->uniforms[gluniform_fade_start], (GLfloat)Surface->LightInfo.fade_start, pglUniform1f);
|
||||
UNIFORM_1(shader->uniforms[gluniform_fade_end], (GLfloat)Surface->LightInfo.fade_end, pglUniform1f);
|
||||
directional = cv_glmdls.value && Surface->LightInfo.directional;
|
||||
directional = Surface->LightInfo.directional;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+1
-1
@@ -1658,7 +1658,7 @@ static void HU_drawMiniChat(void)
|
||||
if (cv_chatbacktint.value) // on request of wolfy
|
||||
V_DrawFillConsoleMap(x + dx + 2, y+dy, charwidth, charheight, 239|V_SNAPTOBOTTOM|V_SNAPTOLEFT);
|
||||
|
||||
V_DrawChatCharacter(x + dx + 2, y+dy+cv_chatcentertext.value, msg[j++] |V_SNAPTOBOTTOM|V_SNAPTOLEFT|transflag, !cv_allcaps.value, colormap);
|
||||
V_DrawChatCharacter(x + dx + 2, y+dy, msg[j++] |V_SNAPTOBOTTOM|V_SNAPTOLEFT|transflag, !cv_allcaps.value, colormap);
|
||||
}
|
||||
|
||||
dx += charwidth;
|
||||
|
||||
+77
-128
@@ -1138,33 +1138,6 @@ static boolean K_UseColorSpeedo(int speedostyle)
|
||||
}
|
||||
}
|
||||
|
||||
enum
|
||||
{
|
||||
GAUGE_DEFAULT = 1,
|
||||
GAUGE_SMALL,
|
||||
GAUGE_BIGNUM,
|
||||
GAUGE_NUMONLY,
|
||||
GAUGE_EXTRA,
|
||||
};
|
||||
|
||||
static SINT8 K_GetDriftgaugeStyle(void)
|
||||
{
|
||||
if (driftgaugegfx)
|
||||
{
|
||||
if (cv_driftgaugestyle.value == 1)
|
||||
return GAUGE_DEFAULT;
|
||||
else if (cv_driftgaugestyle.value == 2)
|
||||
return GAUGE_SMALL;
|
||||
else if (cv_driftgaugestyle.value == 3)
|
||||
return GAUGE_BIGNUM;
|
||||
else if (cv_driftgaugestyle.value == 5 && xtra_speedo3)
|
||||
return GAUGE_EXTRA;
|
||||
}
|
||||
|
||||
// Fallback
|
||||
return GAUGE_NUMONLY; // (cv_driftgaugestyle.value == 4)
|
||||
}
|
||||
|
||||
static boolean K_IsHighResolution(void)
|
||||
{
|
||||
return (vid.width >= 640 && vid.height >= 400);
|
||||
@@ -1340,76 +1313,40 @@ static void K_drawKartStats(void)
|
||||
spdxoffset = 0;
|
||||
spdoffset = 0;
|
||||
|
||||
flags = V_SNAPTOBOTTOM|V_SNAPTOLEFT;
|
||||
|
||||
if (!LUA_HudEnabled(hud_statdisplay))
|
||||
return;
|
||||
|
||||
flags = V_SNAPTOBOTTOM|V_SNAPTOLEFT;
|
||||
|
||||
//Internal offset for speedometer
|
||||
|
||||
const UINT8 speedostyle = K_GetSpeedometerStyle();
|
||||
|
||||
if (cv_kartspeedometer.value && (!splitscreen))
|
||||
{
|
||||
switch (speedostyle)
|
||||
if ((speedostyle == SPEEDO_EXTRA) || (speedostyle == SPEEDO_ACHII) || (speedostyle == SPEEDO_EXTRA3))
|
||||
spdoffset = -10;
|
||||
else if (speedostyle == SPEEDO_DIAL)
|
||||
{
|
||||
case SPEEDO_EXTRA:
|
||||
case SPEEDO_ACHII:
|
||||
case SPEEDO_EXTRA3:
|
||||
spdoffset = -10;
|
||||
break;
|
||||
case SPEEDO_DIAL:
|
||||
spdxoffset = 11;
|
||||
spdoffset = 14;
|
||||
break;
|
||||
default:
|
||||
spdoffset = -14;
|
||||
break;
|
||||
spdxoffset = 11;
|
||||
spdoffset = 14;
|
||||
}
|
||||
else
|
||||
spdoffset = -14;
|
||||
}
|
||||
else
|
||||
spdoffset = 0;
|
||||
|
||||
if (G_BattleGametype() && ((speedostyle != SPEEDO_DIAL) || splitscreen))
|
||||
spdoffset += ((stplyr->kartstuff[k_bumper] ? -5 : -8));
|
||||
if ((speedostyle != SPEEDO_DIAL) || (splitscreen))
|
||||
spdoffset += (G_BattleGametype() ? (stplyr->kartstuff[k_bumper] ? -5 : -8) : 0);
|
||||
|
||||
// Customizations c:
|
||||
if (!splitscreen)
|
||||
{
|
||||
skin_t *fakeskin;
|
||||
INT32 flags2;
|
||||
|
||||
x += 18 + cv_stat_xoffset.value + spdxoffset;
|
||||
y += cv_stat_yoffset.value + spdoffset;
|
||||
|
||||
flags |= V_HUDTRANS;
|
||||
flags2 = flags|V_ALLOWLOWERCASE|V_SkinColorToHighlightcolor(stplyr->skincolor);
|
||||
|
||||
fakeskin = K_GetPlayerSkin(stplyr);
|
||||
|
||||
// Skin name
|
||||
if (K_IsHighResolution()) // V_DrawSmallString becomes a mess at low resolutions lel
|
||||
{
|
||||
V_DrawSmallString(x+20, y+12, flags2, fakeskin->realname);
|
||||
}
|
||||
else
|
||||
{
|
||||
V_DrawThinString(x+20, y+7, flags2, fakeskin->realname);
|
||||
}
|
||||
|
||||
// Icon and stats
|
||||
if (K_UseHighResPortraits())
|
||||
V_DrawSmallMappedPatch(x, y, flags, R_GetSkinFaceWant(stplyr), R_GetLocalTranslationColormap(fakeskin, fakeskin, stplyr->skincolor, GTC_CACHE, stplyr->skinlocal));
|
||||
else
|
||||
V_DrawMappedPatch(x, y, flags, R_GetSkinFaceRank(stplyr), R_GetLocalTranslationColormap(fakeskin, fakeskin, stplyr->skincolor, GTC_CACHE, stplyr->skinlocal));
|
||||
|
||||
V_DrawMappedPatch(x-3, y-2, flags, kp_facenum[min(9, max(1, stplyr->kartspeed))], R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_BLUEBERRY, GTC_CACHE));
|
||||
V_DrawMappedPatch(x+10, y+10, flags, kp_facenum[min(9, max(1, stplyr->kartweight))], R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_BURGUNDY, GTC_CACHE));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (splitscreen == 1) // I tried my best, but this is still mess :/ < :Blobcatpats: c:
|
||||
else if (splitscreen == 1) // I tried my best, but this is still mess :/ < :Blobcatpats: c:
|
||||
{
|
||||
x -= 10;
|
||||
y -= 40;
|
||||
@@ -1447,8 +1384,35 @@ static void K_drawKartStats(void)
|
||||
|
||||
flags |= V_HUDTRANS;
|
||||
|
||||
// In splitscreen, just draw a string with stats
|
||||
V_DrawString(x, y+10, flags, va("\x84%dS \x87%dW", stplyr->kartspeed, stplyr->kartweight));
|
||||
if (!splitscreen)
|
||||
{
|
||||
skin_t *fakeskin;
|
||||
fakeskin = K_GetPlayerSkin(stplyr);
|
||||
|
||||
// Skin name
|
||||
if (K_IsHighResolution()) // V_DrawSmallString becomes a mess at low resolutions lel
|
||||
{
|
||||
V_DrawSmallString(x+20, y+12, flags|V_ALLOWLOWERCASE|V_SkinColorToHighlightcolor(stplyr->skincolor), fakeskin->realname);
|
||||
}
|
||||
else
|
||||
{
|
||||
V_DrawThinString(x+20, y+7, flags|V_ALLOWLOWERCASE|V_SkinColorToHighlightcolor(stplyr->skincolor), fakeskin->realname);
|
||||
}
|
||||
|
||||
// Icon and stats
|
||||
if (K_UseHighResPortraits())
|
||||
V_DrawSmallMappedPatch(x, y, flags, R_GetSkinFaceWant(stplyr), R_GetLocalTranslationColormap(fakeskin, fakeskin, stplyr->skincolor, GTC_CACHE, stplyr->skinlocal));
|
||||
else
|
||||
V_DrawMappedPatch(x, y, flags, R_GetSkinFaceRank(stplyr), R_GetLocalTranslationColormap(fakeskin, fakeskin, stplyr->skincolor, GTC_CACHE, stplyr->skinlocal));
|
||||
|
||||
V_DrawMappedPatch(x-3, y-2, flags, kp_facenum[min(9, max(1, stplyr->kartspeed))], R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_BLUEBERRY, GTC_CACHE));
|
||||
V_DrawMappedPatch(x+10, y+10, flags, kp_facenum[min(9, max(1, stplyr->kartweight))], R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_BURGUNDY, GTC_CACHE));
|
||||
}
|
||||
else
|
||||
{
|
||||
// In splitscreen, just draw a string with stats
|
||||
V_DrawString(x, y+10, flags, va("\x84%dS \x87%dW", stplyr->kartspeed, stplyr->kartweight));
|
||||
}
|
||||
}
|
||||
|
||||
static void K_drawKartItem(void)
|
||||
@@ -3074,12 +3038,6 @@ static void K_drawNameTags(void)
|
||||
else
|
||||
flipped = players[i].mo->eflags & MFE_VERTICALFLIP;
|
||||
|
||||
#ifdef HWRENDER
|
||||
// Needs extra offset. Not perfect but this will do for now
|
||||
if (rendermode == render_opengl && !cv_glshearing.value && cv_smallnametags.value)
|
||||
namey -= dup*6;
|
||||
#endif
|
||||
|
||||
if (cv_smallnametags.value || !nametaggfx)
|
||||
{
|
||||
if (flipped)
|
||||
@@ -3191,7 +3149,7 @@ static void K_drawDriftGauge(void)
|
||||
fixed_t basex, basey;
|
||||
const int dup = vid.dupx;
|
||||
int i;
|
||||
UINT8 *colormap = NULL;
|
||||
UINT8 *cmap;
|
||||
|
||||
static const UINT8 driftcolors[3][4] = {
|
||||
{0, 0, 10, 16}, // no drift
|
||||
@@ -3237,21 +3195,23 @@ skipcrap:
|
||||
const INT32 driftcharge = min(driftval*4, stplyr->kartstuff[k_driftcharge]);
|
||||
const INT32 driftlevel = min(driftcharge / driftval, 2);
|
||||
const INT32 drifttrans = ((cv_driftgaugetrans.value) ? V_LocalTransFlag() : 0);
|
||||
const SINT8 gaugestyle = K_GetDriftgaugeStyle();
|
||||
|
||||
basex = pos.x>>FRACBITS;
|
||||
basey = pos.y>>FRACBITS;
|
||||
|
||||
switch (gaugestyle)
|
||||
switch (cv_driftgaugestyle.value)
|
||||
{
|
||||
case GAUGE_DEFAULT:
|
||||
case GAUGE_SMALL:
|
||||
case GAUGE_EXTRA:
|
||||
case GAUGE_BIGNUM:
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 5:
|
||||
{
|
||||
patch_t *driftpatch = NULL;
|
||||
if (!driftgaugegfx)
|
||||
break;
|
||||
|
||||
if (gaugestyle == GAUGE_DEFAULT || gaugestyle == GAUGE_BIGNUM || gaugestyle == GAUGE_EXTRA)
|
||||
const boolean usescaledpatch = (cv_driftgaugestyle.value == 5 && xtra_speedo3);
|
||||
|
||||
if (cv_driftgaugestyle.value == 1 || cv_driftgaugestyle.value == 3 || usescaledpatch)
|
||||
{
|
||||
barx = basex - dup*23;
|
||||
BAR_WIDTH = dup*47;
|
||||
@@ -3264,44 +3224,40 @@ skipcrap:
|
||||
|
||||
bary = basey - dup*2;
|
||||
|
||||
if (gaugestyle == GAUGE_EXTRA) // i hate hud code i hate hud code i hate hud code i hate hud code i hate hud code.....
|
||||
if (usescaledpatch) // i hate hud code i hate hud code i hate hud code i hate hud code i hate hud code.....
|
||||
{
|
||||
if (K_UseColorSpeedo(SPEEDO_EXTRA3)) // We reuse the extra speedometer patch hence this check
|
||||
if (K_UseColorSpeedo(SPEEDO_EXTRA3)) // Colourized hud
|
||||
{
|
||||
colormap = R_GetTranslationColormap(TC_DEFAULT, K_GetHudColor(), GTC_CACHE);
|
||||
driftpatch = skp_smallstickerclr3;
|
||||
UINT8 *colormap = R_GetTranslationColormap(TC_DEFAULT, K_GetHudColor(), GTC_CACHE);
|
||||
V_DrawStretchyFixedPatch((basex - dup*30)<<FRACBITS, ((basey<<FRACBITS) - FixedMul(dup<<FRACBITS, 21*FRACUNIT/10)), XTRA3PSCALE, XTRA3VSCALE, V_NOSCALESTART|V_OFFSET|drifttrans, skp_smallstickerclr3, colormap, 0);
|
||||
}
|
||||
else
|
||||
driftpatch = skp_smallsticker3;
|
||||
|
||||
V_DrawStretchyFixedPatch((basex - dup*30)<<FRACBITS, ((basey<<FRACBITS) - FixedMul(dup<<FRACBITS, 21*FRACUNIT/10)), XTRA3PSCALE, XTRA3VSCALE, V_NOSCALESTART|V_OFFSET|drifttrans, driftpatch, colormap, 0);
|
||||
V_DrawStretchyFixedPatch((basex - dup*30)<<FRACBITS, ((basey<<FRACBITS) - FixedMul(dup<<FRACBITS, 21*FRACUNIT/10)), XTRA3PSCALE, XTRA3VSCALE, V_NOSCALESTART|V_OFFSET|drifttrans, skp_smallsticker3, NULL, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (K_UseColorHud()) // Colourized hud
|
||||
{
|
||||
colormap = R_GetTranslationColormap(TC_DEFAULT, K_GetHudColor(), GTC_CACHE);
|
||||
driftpatch = (gaugestyle == GAUGE_SMALL ? driftgaugesmallcolor : driftgaugecolor);
|
||||
UINT8 *colormap = R_GetTranslationColormap(TC_DEFAULT, K_GetHudColor(), GTC_CACHE);
|
||||
V_DrawMappedPatch(cv_driftgaugestyle.value == 2 ? basex + dup*11 : basex, basey, V_NOSCALESTART|V_OFFSET|drifttrans, cv_driftgaugestyle.value == 2 ? driftgaugesmallcolor : driftgaugecolor, colormap);
|
||||
}
|
||||
else
|
||||
driftpatch = (gaugestyle == GAUGE_SMALL ? driftgaugesmall : driftgauge);
|
||||
|
||||
V_DrawMappedPatch(gaugestyle == GAUGE_SMALL ? basex + dup*11 : basex, basey, V_NOSCALESTART|V_OFFSET|drifttrans, driftpatch, colormap);
|
||||
V_DrawMappedPatch(cv_driftgaugestyle.value == 2 ? basex + dup*11 : basex, basey, V_NOSCALESTART|V_OFFSET|drifttrans, cv_driftgaugestyle.value == 2 ? driftgaugesmall : driftgauge, NULL);
|
||||
}
|
||||
|
||||
if (driftcharge >= driftval*4) // rainbow sparks
|
||||
{
|
||||
colormap = R_GetTranslationColormap(TC_RAINBOW, K_RainbowColor(), GTC_CACHE);
|
||||
cmap = R_GetTranslationColormap(TC_RAINBOW, 1 + leveltime % (MAXSKINCOLORS-1),GTC_CACHE);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
V_DrawFill(barx, bary+dup*1+dup*i, BAR_WIDTH, dup, (driftrainbow[min((leveltime % 18) + 1, 17)] + i*2) | V_NOSCALESTART|drifttrans);
|
||||
V_DrawFill(barx, bary+dup*1+dup*i, BAR_WIDTH, dup, (driftrainbow[min((leveltime % 18) + 1, 18 - 1)] + i*2) | V_NOSCALESTART|drifttrans);
|
||||
}
|
||||
else // none/blue/red
|
||||
{
|
||||
const INT32 limit = (driftval * (driftcharge >= driftval*2 ? 2 : 1));
|
||||
const INT32 width = ((driftcharge - (driftcharge >= driftval ? limit : 0)) * BAR_WIDTH) / limit;
|
||||
|
||||
colormap = R_GetTranslationColormap(TC_RAINBOW, driftskins[driftlevel], GTC_CACHE);
|
||||
cmap = R_GetTranslationColormap(TC_RAINBOW, driftskins[driftlevel],GTC_CACHE);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
@@ -3313,20 +3269,20 @@ skipcrap:
|
||||
}
|
||||
|
||||
// right, also draw a cool number
|
||||
if (gaugestyle == GAUGE_BIGNUM)
|
||||
V_DrawPaddedTallColorNum(basex + (dup*32), basey, V_NOSCALESTART|V_OFFSET|drifttrans, driftcharge*100 / driftval, 3, colormap);
|
||||
if (cv_driftgaugestyle.value == 3)
|
||||
V_DrawPaddedTallColorNum(basex + (dup*32), basey, V_NOSCALESTART|V_OFFSET|drifttrans, driftcharge*100 / driftval, 3, cmap);
|
||||
else
|
||||
V_DrawPingNum((gaugestyle == GAUGE_SMALL ? basex + (dup*22) : basex + (dup*32)), basey, V_NOSCALESTART|V_OFFSET|drifttrans, driftcharge*100 / driftval, colormap);
|
||||
V_DrawPingNum(cv_driftgaugestyle.value == 2 ? basex + (dup*22) : basex + (dup*32), basey, V_NOSCALESTART|V_OFFSET|drifttrans, driftcharge*100 / driftval, cmap);
|
||||
}
|
||||
break;
|
||||
case GAUGE_NUMONLY:
|
||||
case 4:
|
||||
{
|
||||
if (driftcharge >= driftval*4)
|
||||
colormap = R_GetTranslationColormap(TC_RAINBOW, K_RainbowColor(), GTC_CACHE);
|
||||
cmap = R_GetTranslationColormap(TC_RAINBOW, 1 + leveltime % (MAXSKINCOLORS-1),GTC_CACHE);
|
||||
else
|
||||
colormap = R_GetTranslationColormap(TC_RAINBOW, driftskins[driftlevel], GTC_CACHE);
|
||||
cmap = R_GetTranslationColormap(TC_RAINBOW, driftskins[driftlevel],GTC_CACHE);
|
||||
|
||||
V_DrawPaddedTallColorNum(basex + (dup*16), basey, V_NOSCALESTART|V_OFFSET|drifttrans, driftcharge*100 / driftval, 3, colormap);
|
||||
V_DrawPaddedTallColorNum(basex + (dup*16), basey, V_NOSCALESTART|V_OFFSET|drifttrans, driftcharge*100 / driftval, 3, cmap);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -3387,7 +3343,6 @@ static void K_drawKartWanted(void)
|
||||
{
|
||||
basex = WANT_X;
|
||||
basey = WANT_Y;
|
||||
|
||||
if (splitscreen == 2)
|
||||
{
|
||||
basey += 16; // slight adjust for 3P
|
||||
@@ -4137,23 +4092,17 @@ static void K_drawKartFirstPerson(void)
|
||||
x -= xoffs;
|
||||
else
|
||||
x += xoffs;
|
||||
|
||||
if (!splitscreen)
|
||||
y += yoffs;
|
||||
}
|
||||
|
||||
const INT32 driftcharge = stplyr->kartstuff[k_driftcharge];
|
||||
|
||||
// drift sparks!
|
||||
if ((leveltime & 1) && driftcharge)
|
||||
{
|
||||
if (driftcharge >= dsthree)
|
||||
colmap = R_GetTranslationColormap(TC_RAINBOW, K_RainbowColor(), GTC_CACHE);
|
||||
else if (driftcharge >= dstwo)
|
||||
colmap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_KETCHUP, GTC_CACHE);
|
||||
else if (driftcharge >= dsone)
|
||||
colmap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_SAPPHIRE, GTC_CACHE);
|
||||
}
|
||||
if ((leveltime & 1) && (stplyr->kartstuff[k_driftcharge] >= dsthree))
|
||||
colmap = R_GetTranslationColormap(TC_RAINBOW, K_RainbowColor(), GTC_CACHE);
|
||||
else if ((leveltime & 1) && (stplyr->kartstuff[k_driftcharge] >= dstwo))
|
||||
colmap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_KETCHUP, GTC_CACHE);
|
||||
else if ((leveltime & 1) && (stplyr->kartstuff[k_driftcharge] >= dsone))
|
||||
colmap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_SAPPHIRE, GTC_CACHE);
|
||||
else
|
||||
#endif
|
||||
// invincibility/grow/shrink!
|
||||
@@ -4182,7 +4131,7 @@ static void K_drawInput(void)
|
||||
|
||||
const UINT8 hudcolor = K_GetHudColor();
|
||||
const INT32 accent1 = splitflags|colortranslations[hudcolor][5];
|
||||
const INT32 accent2 = splitflags|colortranslations[hudcolor][7];
|
||||
const INT32 accent2 = splitflags|colortranslations[hudcolor][9];
|
||||
const UINT8 *hudcolormap = R_GetTranslationColormap(0, hudcolor, GTC_CACHE);
|
||||
|
||||
const ticcmd_t *cmd = &stplyr->cmd;
|
||||
|
||||
@@ -66,7 +66,6 @@
|
||||
X (IntermissionThinker),/* Y_Ticker */\
|
||||
X (VoteThinker),/*SRB2KART*/\
|
||||
X (ServerJoin),/* SRB2KART - Saturn 32p*/\
|
||||
X (SetupVote),/*SRB2KART - Saturn*/
|
||||
|
||||
#define STRING_HOOK_LIST(X) \
|
||||
X (BotAI),/* B_BuildTailsTiccmd by skin name */\
|
||||
@@ -141,8 +140,3 @@ int LUA_HookShouldSquish(player_t *player, mobj_t *inflictor, mobj_t *source); /
|
||||
boolean LUA_HookPlayerSpin(player_t *player, mobj_t *inflictor, mobj_t *source); // SRB2KART: Hook for K_SpinPlayer. Allows Lua to execute code and/or overwrite its behavior.
|
||||
boolean LUA_HookPlayerExplode(player_t *player, mobj_t *inflictor, mobj_t *source); // SRB2KART: Hook for K_ExplodePlayer. Allows Lua to execute code and/or overwrite its behavior.
|
||||
boolean LUA_HookPlayerSquish(player_t *player, mobj_t *inflictor, mobj_t *source); // SRB2KART: Hook for K_SquishPlayer. Allows Lua to execute code and/or overwrite its behavior.
|
||||
|
||||
// SRB2KART - Saturn: Allows changing vote level picks
|
||||
// (note: function format in lua doesn't include maxresults, so its function(result, gametype, secondgametype, prevmap)
|
||||
// to get maxresults use #result)
|
||||
void LUA_HookSetupVote(INT16 result[], INT16 maxresults, UINT8 gt, UINT8 secondgt);
|
||||
@@ -1138,43 +1138,3 @@ boolean LUA_HookPlayerExplode(player_t *player, mobj_t *inflictor, mobj_t *sourc
|
||||
{
|
||||
return kartdamage_hook(player, inflictor, source, HOOK(PlayerExplode), res_true);
|
||||
}
|
||||
|
||||
void LUA_HookSetupVote(INT16 result[], INT16 maxresults, UINT8 gt, UINT8 secondgt)
|
||||
{
|
||||
Hook_State hook;
|
||||
if (prepare_hook(&hook, 0, HOOK(SetupVote)))
|
||||
{
|
||||
// { 0, 0, 0, 0, }
|
||||
lua_newtable(gL);
|
||||
for (int i = 1; i <= maxresults; ++i)
|
||||
{
|
||||
lua_pushinteger(gL, 0);
|
||||
lua_rawseti(gL, -2, i);
|
||||
}
|
||||
|
||||
// call_hooks does lua_settop(gL, 0) so we need to store our table somewhere
|
||||
lua_pushvalue(gL, -1);
|
||||
lua_setfield(gL, LUA_REGISTRYINDEX, "SetupVoteResults");
|
||||
|
||||
lua_pushinteger(gL, gt);
|
||||
lua_pushinteger(gL, secondgt);
|
||||
lua_pushinteger(gL, prevmap+1); // prevmap is gamemap-1 so we offset it back
|
||||
|
||||
call_hooks(&hook, 0, res_none);
|
||||
|
||||
lua_getfield(gL, LUA_REGISTRYINDEX, "SetupVoteResults");
|
||||
for (int i = 1; i <= maxresults; ++i)
|
||||
{
|
||||
lua_rawgeti(gL, -1, i);
|
||||
result[i-1] = lua_tointeger(gL, -1);
|
||||
lua_pop(gL, 1);
|
||||
|
||||
if (result[i-1] && (result[i-1] < 0 || !mapheaderinfo[result[i-1]-1]))
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, "Unknown map #%d for vote\n", result[i-1]);
|
||||
result[i-1] = 0;
|
||||
}
|
||||
}
|
||||
lua_pop(gL, 1);
|
||||
}
|
||||
}
|
||||
+69
-23
@@ -24,7 +24,6 @@
|
||||
#include "p_slopes.h" // for P_SlopeById
|
||||
#include "s_sound.h"
|
||||
#include "m_menu.h"
|
||||
#include "m_argv.h"
|
||||
#ifdef LUA_ALLOW_BYTECODE
|
||||
#include "d_netfil.h" // for LUA_DumpFile
|
||||
#endif
|
||||
@@ -253,11 +252,7 @@ static inline void LUA_LoadFile(MYFILE *f, char *name)
|
||||
|
||||
lua_pushcfunction(gL, LUA_GetErrorMessage);
|
||||
if (luaL_loadbuffer(gL, f->data, f->size, va("@%s",name)) || lua_pcall(gL, 0, 0, lua_gettop(gL) - 1)) {
|
||||
if (M_CheckParm("-strict") || M_CheckParm("-strict-lua"))
|
||||
I_Error("Lua error: %s", lua_tostring(gL, -1));
|
||||
else
|
||||
CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL,-1));
|
||||
|
||||
CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL,-1));
|
||||
lua_pop(gL,1);
|
||||
}
|
||||
lua_gc(gL, LUA_GCCOLLECT, 0);
|
||||
@@ -371,7 +366,18 @@ void LUA_DumpFile(const char *filename)
|
||||
}
|
||||
#endif
|
||||
|
||||
fixed_t LUA_EvalMath(const char *word)
|
||||
static void createMathLibState(void)
|
||||
{
|
||||
mL = lua_newstate(LUA_Alloc, NULL);
|
||||
lua_atpanic(mL, LUA_Panic);
|
||||
|
||||
// open only enum lib
|
||||
lua_pushcfunction(mL, LUA_EnumLib);
|
||||
lua_pushboolean(mL, true);
|
||||
lua_call(mL, 1, 0);
|
||||
}
|
||||
|
||||
fixed_t LUA_EvalMathEx(const char *word, const char **error)
|
||||
{
|
||||
char buf[1024], *b;
|
||||
const char *p;
|
||||
@@ -380,15 +386,7 @@ fixed_t LUA_EvalMath(const char *word)
|
||||
// make a new state so SOC can't interefere with scripts
|
||||
// allocate state
|
||||
if (mL == NULL)
|
||||
{
|
||||
mL = lua_newstate(LUA_Alloc, NULL);
|
||||
lua_atpanic(mL, LUA_Panic);
|
||||
|
||||
// open only enum lib
|
||||
lua_pushcfunction(mL, LUA_EnumLib);
|
||||
lua_pushboolean(mL, true);
|
||||
lua_call(mL, 1, 0);
|
||||
}
|
||||
createMathLibState();
|
||||
|
||||
// change ^ into ^^ for Lua.
|
||||
strcpy(buf, "return ");
|
||||
@@ -399,6 +397,9 @@ fixed_t LUA_EvalMath(const char *word)
|
||||
if (*p == '^')
|
||||
*b++ = '^';
|
||||
}
|
||||
// length of word is zero!?
|
||||
if (p == word)
|
||||
return 0;
|
||||
*b = '\0';
|
||||
|
||||
// eval string.
|
||||
@@ -414,7 +415,7 @@ fixed_t LUA_EvalMath(const char *word)
|
||||
|
||||
p += 3; // "1: "
|
||||
}
|
||||
CONS_Alert(CONS_WARNING, "%s\n", p);
|
||||
if (error) *error = p;
|
||||
}
|
||||
else
|
||||
res = lua_tointeger(mL, -1);
|
||||
@@ -422,6 +423,51 @@ fixed_t LUA_EvalMath(const char *word)
|
||||
return res;
|
||||
}
|
||||
|
||||
fixed_t LUA_EvalMath(const char *word)
|
||||
{
|
||||
const char *error = NULL;
|
||||
fixed_t res = LUA_EvalMathEx(word, &error);
|
||||
|
||||
if (error)
|
||||
CONS_Alert(CONS_WARNING, "%s\n", error);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
// A hack to prevent lua from crashing game if constant doesn't exist
|
||||
static int lua_get_constant(lua_State *L)
|
||||
{
|
||||
lua_pushvalue(mL, LUA_GLOBALSINDEX);
|
||||
lua_pushvalue(L, 1);
|
||||
lua_gettable(L, -2);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
fixed_t LUA_GetConstant(const char *word)
|
||||
{
|
||||
if (mL == NULL)
|
||||
createMathLibState();
|
||||
|
||||
fixed_t res = 0;
|
||||
|
||||
lua_pushcfunction(mL, lua_get_constant);
|
||||
lua_pushstring(mL, word);
|
||||
|
||||
if (lua_pcall(mL, 1, 1, 0) == 0)
|
||||
{
|
||||
if (lua_isnumber(mL, -1))
|
||||
res = lua_tointeger(mL, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Pop error message
|
||||
lua_pop(mL, 1);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
void LUA_InvalidateMathlibCache(const char *name)
|
||||
{
|
||||
// No state => no cache => nothing to invalidate :3
|
||||
@@ -1028,8 +1074,8 @@ static UINT8 UnArchiveValue(UINT8 **p, int TABLESINDEX, boolean network)
|
||||
case ARCH_MOBJ:
|
||||
if (network == false) // for replays :chaosleep:
|
||||
{
|
||||
*p += sizeof(UINT32); // Skip this data, we can't read a mobj here, it'd point to garbage and crash the game.
|
||||
return 3; // Don't set the field
|
||||
*p += sizeof(UINT32); // Skip this data, we can't read a mobj here, it'd point to garbage and crash the game.
|
||||
return 3; // Don't set the field
|
||||
}
|
||||
|
||||
LUA_PushUserdata(gL, P_FindNewPosition(READUINT32(*p)), META_MOBJ);
|
||||
@@ -1104,9 +1150,9 @@ static void UnArchiveExtVars(UINT8 **p, void *pointer, boolean network)
|
||||
CONS_Alert(CONS_ERROR, "Unexpected end marker when reading ExtVars (field '%s')\n", field);
|
||||
break;
|
||||
}
|
||||
else if (ret == 3) // This will return 3 if we shouldn't set this field.
|
||||
else if (ret == 3) // This will return 3 if we shouldn't set this field.
|
||||
{
|
||||
//CONS_Alert(CONS_WARNING,"Cannot read mobj_t stored in player variable \'%s\'. Desyncs may occur.\n", field);
|
||||
CONS_Alert(CONS_WARNING,"Cannot read mobj_t stored in player variable \'%s\'. Desyncs may occur.\n", field);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1160,7 +1206,7 @@ static void UnArchiveTables(UINT8 **p, boolean network)
|
||||
ret = UnArchiveValue(p, TABLESINDEX, network);
|
||||
if (ret == 3)
|
||||
{
|
||||
//CONS_Alert(CONS_WARNING,"Couldn't read mobj_t\n");
|
||||
CONS_Alert(CONS_WARNING,"Couldn't read mobj_t\n");
|
||||
lua_pushnil(gL);
|
||||
}
|
||||
else if (ret == 1) // read key
|
||||
@@ -1175,7 +1221,7 @@ static void UnArchiveTables(UINT8 **p, boolean network)
|
||||
}
|
||||
else if (ret == 3)
|
||||
{
|
||||
//CONS_Alert(CONS_WARNING,"Couldn't read mobj_t\n");
|
||||
CONS_Alert(CONS_WARNING,"Couldn't read mobj_t\n");
|
||||
lua_pushnil(gL);
|
||||
}
|
||||
else if (ret == 2) // read value
|
||||
|
||||
@@ -48,7 +48,9 @@ void LUA_LoadLump(UINT16 wad, UINT16 lump);
|
||||
#ifdef LUA_ALLOW_BYTECODE
|
||||
void LUA_DumpFile(const char *filename);
|
||||
#endif
|
||||
fixed_t LUA_EvalMathEx(const char *word, const char **error);
|
||||
fixed_t LUA_EvalMath(const char *word);
|
||||
fixed_t LUA_GetConstant(const char *word);
|
||||
|
||||
// Need better name for this ;-;
|
||||
void LUA_InvalidateMathlibCache(const char *name);
|
||||
|
||||
+17
-6
@@ -3752,7 +3752,7 @@ I_mutex replayquerymutex;
|
||||
#endif/*HAVE_THREADS*/
|
||||
|
||||
|
||||
#define MAXREPLAYQUERY 37
|
||||
#define MAXREPLAYQUERY 40
|
||||
static char replayqueryinput_buffer[MAXREPLAYQUERY+1]; // The input typed
|
||||
static textinput_t replayqueryinput;
|
||||
|
||||
@@ -4454,7 +4454,7 @@ static void M_DrawReplayHut(void)
|
||||
DrawReplayHutReplayInfo();
|
||||
}
|
||||
|
||||
x = 4;
|
||||
x -= 40;
|
||||
|
||||
// Draw search query
|
||||
M_DrawTextBoxFlags(x, 200 - 22, MAXREPLAYQUERY, 1, V_SNAPTOBOTTOM);
|
||||
@@ -5271,13 +5271,24 @@ static void M_DrawSkyRoom(void)
|
||||
|
||||
V_DrawRightAlignedString(BASEVIDWIDTH - currentMenu->x,
|
||||
currentMenu->y+currentMenu->menuitems[2].alphaKey,
|
||||
(music_disabled ? warningflags : highlightflags),
|
||||
(music_disabled ? "OFF" : "ON"));
|
||||
(digital_disabled ? warningflags : highlightflags),
|
||||
(digital_disabled ? "OFF" : "ON"));
|
||||
|
||||
#ifndef NO_MIDI
|
||||
V_DrawRightAlignedString(BASEVIDWIDTH - currentMenu->x,
|
||||
currentMenu->y+currentMenu->menuitems[5].alphaKey,
|
||||
(midi_disabled ? warningflags : highlightflags),
|
||||
(midi_disabled ? "OFF" : "ON"));
|
||||
#endif
|
||||
|
||||
if (itemOn == 0)
|
||||
lengthstring = 8*(sound_disabled ? 3 : 2);
|
||||
else if (itemOn == 2)
|
||||
lengthstring = 8*(music_disabled ? 3 : 2);
|
||||
lengthstring = 8*(digital_disabled ? 3 : 2);
|
||||
#ifndef NO_MIDI
|
||||
else if (itemOn == 5)
|
||||
lengthstring = 8*(midi_disabled ? 3 : 2);
|
||||
#endif
|
||||
}
|
||||
|
||||
for (i = 0; i < currentMenu->numitems; ++i)
|
||||
@@ -7046,7 +7057,7 @@ static INT32 M_FindFirstMap(INT32 gtype)
|
||||
{
|
||||
INT32 i;
|
||||
|
||||
if (mapheaderinfo[gamemap-1] && (mapheaderinfo[gamemap-1]->typeoflevel & gtype))
|
||||
if (mapheaderinfo[gamemap] && (mapheaderinfo[gamemap]->typeoflevel & gtype))
|
||||
return gamemap;
|
||||
|
||||
for (i = 0; i < NUMMAPS; i++)
|
||||
|
||||
+35
-36
@@ -1070,26 +1070,29 @@ enum
|
||||
static menuitem_t OP_SoundOptionsMenu[] =
|
||||
{
|
||||
{IT_STRING|IT_CVAR|IT_CV_NOPRINT, NULL, "SFX", &cv_gamesounds, 10},
|
||||
{IT_STRING|IT_CVAR|IT_CV_SLIDER, NULL, "SFX Volume", &cv_soundvolume, 18},
|
||||
{IT_STRING|IT_CVAR|IT_CV_SLIDER,
|
||||
NULL, "SFX Volume", &cv_soundvolume, 18},
|
||||
|
||||
{IT_STRING|IT_CVAR|IT_CV_NOPRINT, NULL, "Music", &cv_gamedigimusic, 30},
|
||||
{IT_STRING|IT_CVAR|IT_CV_SLIDER, NULL, "Music Volume", &cv_digmusicvolume, 38},
|
||||
{IT_STRING|IT_CVAR|IT_CV_SLIDER,
|
||||
NULL, "Music Volume", &cv_digmusicvolume, 38},
|
||||
|
||||
//#ifndef NO_MIDI
|
||||
#if 0
|
||||
{IT_STRING|IT_CVAR|IT_CV_SLIDER, NULL, "MIDI Volume", &cv_midimusicvolume, 46},
|
||||
#ifndef NO_MIDI
|
||||
{IT_STRING|IT_CVAR, NULL, "MIDI", &cv_gamemidimusic, 50},
|
||||
{IT_STRING|IT_CVAR|IT_CV_SLIDER,
|
||||
NULL, "MIDI Volume", &cv_midimusicvolume, 58},
|
||||
|
||||
{IT_STRING|IT_CVAR, NULL, "Reverse L/R Channels", &stereoreverse, 60},
|
||||
{IT_STRING|IT_CVAR, NULL, "Reverse L/R Channels", &stereoreverse, 50},
|
||||
|
||||
{IT_STRING|IT_CVAR, NULL, "Chat Notifications", &cv_chatnotifications, 75},
|
||||
{IT_STRING|IT_CVAR, NULL, "Character voices", &cv_kartvoices, 85},
|
||||
{IT_STRING|IT_CVAR, NULL, "Hit Em Delay", &cv_karthitemdialog, 95},
|
||||
{IT_STRING|IT_CVAR, NULL, "Powerup Warning", &cv_kartinvinsfx, 105},
|
||||
{IT_STRING|IT_CVAR, NULL, "Chat Notifications", &cv_chatnotifications, 65},
|
||||
{IT_STRING|IT_CVAR, NULL, "Character voices", &cv_kartvoices, 75},
|
||||
{IT_STRING|IT_CVAR, NULL, "Hit Em Delay", &cv_karthitemdialog, 85},
|
||||
{IT_STRING|IT_CVAR, NULL, "Powerup Warning", &cv_kartinvinsfx, 95},
|
||||
|
||||
{IT_KEYHANDLER|IT_STRING, NULL, "Sound Test", M_HandleSoundTest, 115},
|
||||
{IT_STRING|IT_CALL, NULL, "Music Test", M_MusicTest, 125},
|
||||
{IT_KEYHANDLER|IT_STRING, NULL, "Sound Test", M_HandleSoundTest, 105},
|
||||
{IT_STRING|IT_CALL, NULL, "Music Test", M_MusicTest, 115},
|
||||
|
||||
{IT_STRING|IT_SUBMENU, NULL, "Advanced Settings...", &OP_SoundAdvancedDef, 135}
|
||||
{IT_STRING|IT_SUBMENU, NULL, "Advanced Settings...", &OP_SoundAdvancedDef, 125}
|
||||
#else
|
||||
{IT_STRING|IT_CVAR, NULL, "Reverse L/R Channels", &stereoreverse, 60},
|
||||
|
||||
@@ -1111,8 +1114,8 @@ static const char* OP_SoundTooltips[] =
|
||||
"Volume of Sound effects.",
|
||||
"Turn Music on or off.",
|
||||
"Volume of Music.",
|
||||
//#ifndef NO_MIDI
|
||||
#if 0
|
||||
#ifndef NO_MIDI
|
||||
"Turn Midi Music on or off.",
|
||||
"Volume of Midi Music.",
|
||||
#endif
|
||||
"Reverse left and right channels of audio.",
|
||||
@@ -1346,15 +1349,14 @@ static const char* OP_CamOptionsTooltips[] =
|
||||
};
|
||||
|
||||
#define OP_CAMMENU(pnum) \
|
||||
{IT_STRING | IT_CVAR, NULL, "Flipcam", &cv_flipcam[pnum], 30}, \
|
||||
{IT_STRING | IT_CVAR | IT_CV_BIGFLOAT, NULL, "Camera Distance", &cv_cam_dist[pnum], 50}, \
|
||||
{IT_STRING | IT_CVAR | IT_CV_BIGFLOAT, NULL, "Camera Height", &cv_cam_height[pnum], 60}, \
|
||||
{IT_STRING | IT_CVAR, NULL, "Camera Slope Pitch", &cv_cam_pitch[pnum], 70}, \
|
||||
{IT_STRING | IT_CVAR, NULL, "Camera Speed", &cv_cam_speed[pnum], 80}, \
|
||||
{IT_STRING | IT_CVAR, NULL, "Camera Lookback Momentum", &cv_cam_lookbackmom[pnum], 100}, \
|
||||
{IT_STRING | IT_CVAR, NULL, "Camera Vertical Look", &cv_verticallook[pnum], 110}, \
|
||||
{IT_STRING | IT_CVAR, NULL, "Freecam Speed", &cv_freecam_speed[pnum], 130}, \
|
||||
{IT_STRING | IT_CVAR, NULL, "Third Person Camera", &cv_chasecam[pnum], 145}, \
|
||||
{IT_STRING | IT_CVAR, NULL, "Flipcam", &cv_flipcam[pnum], 30}, \
|
||||
{IT_STRING | IT_CVAR | IT_CV_BIGFLOAT, NULL, "Camera Distance", &cv_cam_dist[pnum], 50}, \
|
||||
{IT_STRING | IT_CVAR | IT_CV_BIGFLOAT, NULL, "Camera Height", &cv_cam_height[pnum], 60}, \
|
||||
{IT_STRING | IT_CVAR, NULL, "Camera Speed", &cv_cam_speed[pnum], 70}, \
|
||||
{IT_STRING | IT_CVAR, NULL, "Camera Lookback Momentum", &cv_lookbackmom[pnum], 90}, \
|
||||
{IT_STRING | IT_CVAR, NULL, "Camera Vertical Look", &cv_verticallook[pnum], 100}, \
|
||||
{IT_STRING | IT_CVAR, NULL, "Freecam Speed", &cv_freecam_speed[pnum], 120}, \
|
||||
{IT_STRING | IT_CVAR, NULL, "Third Person Camera", &cv_chasecam[pnum], 135}, \
|
||||
|
||||
static menuitem_t OP_Player1CamOptionsMenu[] =
|
||||
{
|
||||
@@ -1386,7 +1388,6 @@ static const char* OP_PlayerCamOptionsTooltips[] =
|
||||
"Should the Camera flip on gravity flipped sections?.",
|
||||
"Camera distance relative to the Player.",
|
||||
"Height of the Camera",
|
||||
"Pitch Camera on Upwards or Downhill Slopes",
|
||||
"Speed of the Camera",
|
||||
"Should looking back inherit the Players Momentum?\nEither inherit Player Momentum or double of it\nmay make looking back while boosting or going in high speed less jarring",
|
||||
"Allows looking up/down by holding\naim forward/backward while standing still.",
|
||||
@@ -1404,19 +1405,18 @@ static menuitem_t OP_ChatOptionsMenu[] =
|
||||
NULL, "Chat Box Width", &cv_chatwidth, 20},
|
||||
{IT_STRING | IT_CVAR | IT_CV_SLIDER,
|
||||
NULL, "Chat Box Height", &cv_chatheight, 30},
|
||||
{IT_STRING | IT_CVAR, NULL, "Center Text in Chat", &cv_chatcentertext, 40},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Chat Background Tint", &cv_chatbacktint, 55},
|
||||
{IT_STRING | IT_CVAR, NULL, "Message Fadeout Time", &cv_chattime, 65},
|
||||
{IT_STRING | IT_CVAR, NULL, "Spam Protection", &cv_chatspamprotection, 75},
|
||||
{IT_STRING | IT_CVAR, NULL, "Max Chat Messages", &cv_chatlogsize, 85},
|
||||
{IT_STRING | IT_CVAR, NULL, "Chat Background Tint", &cv_chatbacktint, 45},
|
||||
{IT_STRING | IT_CVAR, NULL, "Message Fadeout Time", &cv_chattime, 55},
|
||||
{IT_STRING | IT_CVAR, NULL, "Spam Protection", &cv_chatspamprotection, 65},
|
||||
{IT_STRING | IT_CVAR, NULL, "Max Chat Messages", &cv_chatlogsize, 75},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Local ping display", &cv_showping, 105}, // shows ping above the framerate if we want to.
|
||||
{IT_STRING | IT_CVAR, NULL, "Ping display style", &cv_pingstyle, 115},
|
||||
{IT_STRING | IT_CVAR, NULL, "Ping measurement", &cv_pingmeasurement, 125},
|
||||
{IT_STRING | IT_CVAR, NULL, "Ping icon", &cv_pingicon, 135},
|
||||
{IT_STRING | IT_CVAR, NULL, "Local ping display", &cv_showping, 95}, // shows ping above the framerate if we want to.
|
||||
{IT_STRING | IT_CVAR, NULL, "Ping display style", &cv_pingstyle, 105},
|
||||
{IT_STRING | IT_CVAR, NULL, "Ping measurement", &cv_pingmeasurement, 115},
|
||||
{IT_STRING | IT_CVAR, NULL, "Ping icon", &cv_pingicon, 125},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Show IP address in playerlist", &cv_shownodeip, 145},
|
||||
{IT_STRING | IT_CVAR, NULL, "Show IP address in playerlist", &cv_shownodeip, 135},
|
||||
};
|
||||
|
||||
static const char* OP_ChatOptionsTooltips[] =
|
||||
@@ -1424,7 +1424,6 @@ static const char* OP_ChatOptionsTooltips[] =
|
||||
"Chat mode used for in-game chat.",
|
||||
"Width of chat box.",
|
||||
"Height of chat box.",
|
||||
"Center text in the chat message pop ups.",
|
||||
"Chatbox background.",
|
||||
"Fadeout time for new chat message.",
|
||||
"Spam protection for in-game chat.",
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ ATTRINLINE static fixed_t FUNCINLINE __internal_prng__(void)
|
||||
randomseed ^= randomseed >> 13;
|
||||
randomseed ^= randomseed >> 11;
|
||||
randomseed ^= randomseed << 21;
|
||||
return ((randomseed*36548569) >> 4) & (FRACUNIT-1);
|
||||
return ( (randomseed*36548569) >> 4) & (FRACUNIT-1);
|
||||
}
|
||||
|
||||
/** Provides a random fixed point number. Distribution is uniform.
|
||||
|
||||
+4
-8
@@ -128,9 +128,6 @@ typedef struct camera_s
|
||||
// SRB2Kart: camera pans while drifting
|
||||
fixed_t pan;
|
||||
|
||||
// SRB2Kart: camera pitches on slopes
|
||||
angle_t pitch;
|
||||
|
||||
// postproccess effects
|
||||
UINT8 postimg;
|
||||
} camera_t;
|
||||
@@ -147,11 +144,9 @@ enum
|
||||
|
||||
extern camera_t camera[MAXSPLITSCREENPLAYERS];
|
||||
extern consvar_t cv_cam_dist[MAXSPLITSCREENPLAYERS];
|
||||
extern consvar_t cv_cam_height[MAXSPLITSCREENPLAYERS];
|
||||
extern consvar_t cv_cam_pitch[MAXSPLITSCREENPLAYERS];
|
||||
extern consvar_t cv_cam_speed[MAXSPLITSCREENPLAYERS];
|
||||
extern consvar_t cv_cam_lookbackmom[MAXSPLITSCREENPLAYERS];
|
||||
extern consvar_t cv_cam_still[MAXSPLITSCREENPLAYERS];
|
||||
extern consvar_t cv_cam_height[MAXSPLITSCREENPLAYERS];
|
||||
extern consvar_t cv_cam_speed[MAXSPLITSCREENPLAYERS];
|
||||
extern consvar_t cv_cam_rotate[MAXSPLITSCREENPLAYERS];
|
||||
extern consvar_t cv_cam_timeover[MAXSPLITSCREENPLAYERS];
|
||||
|
||||
@@ -165,6 +160,8 @@ extern consvar_t cv_actionmovie;
|
||||
|
||||
extern consvar_t cv_screenquake;
|
||||
|
||||
extern consvar_t cv_lookbackmom[MAXSPLITSCREENPLAYERS];
|
||||
|
||||
extern consvar_t cv_verticallook[MAXSPLITSCREENPLAYERS];
|
||||
|
||||
extern fixed_t t_cam_rotate[MAXSPLITSCREENPLAYERS];
|
||||
@@ -183,7 +180,6 @@ void P_CalcChasePostImg(player_t *player, camera_t *thiscam);
|
||||
boolean P_PlayerInPain(player_t *player);
|
||||
void P_DoPlayerPain(player_t *player, mobj_t *source, mobj_t *inflictor);
|
||||
void P_ResetPlayer(player_t *player);
|
||||
player_t *P_GetLocalPlayerForNum(UINT8 pnum);
|
||||
boolean P_IsLocalPlayer(const player_t *player);
|
||||
boolean P_IsDisplayPlayer(const player_t *player);
|
||||
|
||||
|
||||
+2
-4
@@ -9854,6 +9854,7 @@ mobj_t *P_SpawnShadowMobj(mobj_t * caster)
|
||||
mobj->radius = info->radius;
|
||||
mobj->height = info->height;
|
||||
mobj->flags = info->flags;
|
||||
mobj->blendmode = AST_TRANSLUCENT;
|
||||
|
||||
mobj->health = info->spawnhealth;
|
||||
|
||||
@@ -9889,10 +9890,7 @@ mobj_t *P_SpawnShadowMobj(mobj_t * caster)
|
||||
}
|
||||
|
||||
// Sprite rendering
|
||||
mobj->blendmode = AST_TRANSLUCENT;
|
||||
mobj->realxscale = mobj->realyscale = mobj->scale;
|
||||
mobj->spritexscale = mobj->realxscale;
|
||||
mobj->spriteyscale = mobj->realyscale;
|
||||
mobj->spritexscale = mobj->spriteyscale = mobj->scale;
|
||||
|
||||
// set subsector and/or block links
|
||||
P_SetThingPosition(mobj);
|
||||
|
||||
+1
-1
@@ -1511,7 +1511,7 @@ static polyobj_t *Polyobj_GetParent(polyobj_t *po)
|
||||
// Iteratively retrieves the children POs of a parent,
|
||||
// sorta like P_FindSectorSpecialFromTag.
|
||||
//
|
||||
polyobj_t *Polyobj_GetChild(polyobj_t *po, INT32 *start)
|
||||
static polyobj_t *Polyobj_GetChild(polyobj_t *po, INT32 *start)
|
||||
{
|
||||
for (; *start < numPolyObjects; (*start)++)
|
||||
{
|
||||
|
||||
@@ -269,7 +269,6 @@ typedef struct polydisplacedata_s
|
||||
//
|
||||
|
||||
polyobj_t *Polyobj_GetForNum(INT32 id);
|
||||
polyobj_t *Polyobj_GetChild(polyobj_t *po, INT32 *start);
|
||||
void Polyobj_InitLevel(void);
|
||||
void Polyobj_MoveOnLoad(polyobj_t *po, angle_t angle, fixed_t x, fixed_t y);
|
||||
boolean P_PointInsidePolyobj(polyobj_t *po, fixed_t x, fixed_t y);
|
||||
|
||||
-119
@@ -2234,12 +2234,6 @@ static void LoadSpecialLevelThinker(savebuffer_t *save, actionf_p1 thinker, UINT
|
||||
}
|
||||
|
||||
P_AddThinker(&ht->thinker);
|
||||
|
||||
// interpolation
|
||||
if (floorOrCeiling & 2)
|
||||
R_CreateInterpolator_SectorPlane(&ht->thinker, ht->sector, true);
|
||||
if (floorOrCeiling & 1)
|
||||
R_CreateInterpolator_SectorPlane(&ht->thinker, ht->sector, false);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -2269,9 +2263,6 @@ static void LoadCeilingThinker(savebuffer_t *save, actionf_p1 thinker)
|
||||
if (ht->sector)
|
||||
ht->sector->ceilingdata = ht;
|
||||
P_AddThinker(&ht->thinker);
|
||||
|
||||
// interpolation
|
||||
R_CreateInterpolator_SectorPlane(&ht->thinker, ht->sector, true);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -2296,9 +2287,6 @@ static void LoadFloormoveThinker(savebuffer_t *save, actionf_p1 thinker)
|
||||
if (ht->sector)
|
||||
ht->sector->floordata = ht;
|
||||
P_AddThinker(&ht->thinker);
|
||||
|
||||
// interpolation
|
||||
R_CreateInterpolator_SectorPlane(&ht->thinker, ht->sector, false);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -2412,12 +2400,6 @@ static void LoadElevatorThinker(savebuffer_t *save, actionf_p1 thinker, UINT8 fl
|
||||
}
|
||||
|
||||
P_AddThinker(&ht->thinker);
|
||||
|
||||
// interpolation
|
||||
if (floorOrCeiling & 2)
|
||||
R_CreateInterpolator_SectorPlane(&ht->thinker, ht->sector, true);
|
||||
if (floorOrCeiling & 1)
|
||||
R_CreateInterpolator_SectorPlane(&ht->thinker, ht->sector, false);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -2440,22 +2422,6 @@ static void LoadScrollThinker(savebuffer_t *save, actionf_p1 thinker)
|
||||
ht->exclusive = READINT32(save->p);
|
||||
ht->type = READUINT8(save->p);
|
||||
P_AddThinker(&ht->thinker);
|
||||
|
||||
// interpolation
|
||||
switch (ht->type)
|
||||
{
|
||||
case sc_side:
|
||||
R_CreateInterpolator_SideScroll(&ht->thinker, &sides[ht->affectee]);
|
||||
break;
|
||||
case sc_floor:
|
||||
R_CreateInterpolator_SectorScroll(&ht->thinker, §ors[ht->affectee], false);
|
||||
break;
|
||||
case sc_ceiling:
|
||||
R_CreateInterpolator_SectorScroll(&ht->thinker, §ors[ht->affectee], true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -2587,17 +2553,6 @@ static inline void LoadPolyrotatetThinker(savebuffer_t *save, actionf_p1 thinker
|
||||
ht->distance = READINT32(save->p);
|
||||
ht->turnobjs = READUINT8(save->p);
|
||||
P_AddThinker(&ht->thinker);
|
||||
|
||||
// interpolation
|
||||
polyobj_t *po;
|
||||
|
||||
if (!(po = Polyobj_GetForNum(ht->polyObjNum)))
|
||||
{
|
||||
CONS_Debug(DBG_POLYOBJ, "EV_DoPolyObjRotate: bad polyobj %d\n", ht->polyObjNum);
|
||||
return;
|
||||
}
|
||||
|
||||
R_CreateInterpolator_Polyobj(&ht->thinker, po);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -2616,17 +2571,6 @@ static void LoadPolymoveThinker(savebuffer_t *save, actionf_p1 thinker)
|
||||
ht->distance = READINT32(save->p);
|
||||
ht->angle = READANGLE(save->p);
|
||||
P_AddThinker(&ht->thinker);
|
||||
|
||||
// interpolation
|
||||
polyobj_t *po;
|
||||
|
||||
if (!(po = Polyobj_GetForNum(ht->polyObjNum)))
|
||||
{
|
||||
CONS_Debug(DBG_POLYOBJ, "EV_DoPolyObjRotate: bad polyobj %d\n", ht->polyObjNum);
|
||||
return;
|
||||
}
|
||||
|
||||
R_CreateInterpolator_Polyobj(&ht->thinker, po);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -2651,36 +2595,6 @@ static inline void LoadPolywaypointThinker(savebuffer_t *save, actionf_p1 thinke
|
||||
ht->diffy = READFIXED(save->p);
|
||||
ht->diffz = READFIXED(save->p);
|
||||
P_AddThinker(&ht->thinker);
|
||||
|
||||
// interpolation
|
||||
polyobj_t *po;
|
||||
polyobj_t *oldpo;
|
||||
INT32 start;
|
||||
|
||||
if (!(po = Polyobj_GetForNum(ht->polyObjNum)))
|
||||
{
|
||||
CONS_Debug(DBG_POLYOBJ, "EV_DoPolyObjRotate: bad polyobj %d\n", ht->polyObjNum);
|
||||
return;
|
||||
}
|
||||
|
||||
R_CreateInterpolator_Polyobj(&ht->thinker, po);
|
||||
// T_PolyObjWaypoint is the only polyobject movement
|
||||
// that can adjust z, so we add these ones too.
|
||||
R_CreateInterpolator_SectorPlane(&ht->thinker, po->lines[0]->backsector, false);
|
||||
R_CreateInterpolator_SectorPlane(&ht->thinker, po->lines[0]->backsector, true);
|
||||
|
||||
// Most other polyobject functions handle children by recursively
|
||||
// giving each child another thinker. T_PolyObjWaypoint handles
|
||||
// it manually though, which means we need to manually give them
|
||||
// interpolation here instead.
|
||||
start = 0;
|
||||
oldpo = po;
|
||||
while ((po = Polyobj_GetChild(oldpo, &start)))
|
||||
{
|
||||
R_CreateInterpolator_Polyobj(&ht->thinker, po);
|
||||
R_CreateInterpolator_SectorPlane(&ht->thinker, po->lines[0]->backsector, false);
|
||||
R_CreateInterpolator_SectorPlane(&ht->thinker, po->lines[0]->backsector, true);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -2706,17 +2620,6 @@ static inline void LoadPolyslidedoorThinker(savebuffer_t *save, actionf_p1 think
|
||||
ht->momy = READFIXED(save->p);
|
||||
ht->closing = READUINT8(save->p);
|
||||
P_AddThinker(&ht->thinker);
|
||||
|
||||
// interpolation
|
||||
polyobj_t *po;
|
||||
|
||||
if (!(po = Polyobj_GetForNum(ht->polyObjNum)))
|
||||
{
|
||||
CONS_Debug(DBG_POLYOBJ, "EV_DoPolyObjRotate: bad polyobj %d\n", ht->polyObjNum);
|
||||
return;
|
||||
}
|
||||
|
||||
R_CreateInterpolator_Polyobj(&ht->thinker, po);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -2737,17 +2640,6 @@ static inline void LoadPolyswingdoorThinker(savebuffer_t *save, actionf_p1 think
|
||||
ht->distance = READINT32(save->p);
|
||||
ht->closing = READUINT8(save->p);
|
||||
P_AddThinker(&ht->thinker);
|
||||
|
||||
// interpolation
|
||||
polyobj_t *po;
|
||||
|
||||
if (!(po = Polyobj_GetForNum(ht->polyObjNum)))
|
||||
{
|
||||
CONS_Debug(DBG_POLYOBJ, "EV_DoPolyObjRotate: bad polyobj %d\n", ht->polyObjNum);
|
||||
return;
|
||||
}
|
||||
|
||||
R_CreateInterpolator_Polyobj(&ht->thinker, po);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -2765,17 +2657,6 @@ static inline void LoadPolydisplaceThinker(savebuffer_t *save, actionf_p1 thinke
|
||||
ht->dy = READFIXED(save->p);
|
||||
ht->oldHeights = READFIXED(save->p);
|
||||
P_AddThinker(&ht->thinker);
|
||||
|
||||
// interpolation
|
||||
polyobj_t *po;
|
||||
|
||||
if (!(po = Polyobj_GetForNum(ht->polyObjNum)))
|
||||
{
|
||||
CONS_Debug(DBG_POLYOBJ, "EV_DoPolyObjRotate: bad polyobj %d\n", ht->polyObjNum);
|
||||
return;
|
||||
}
|
||||
|
||||
R_CreateInterpolator_Polyobj(&ht->thinker, po);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
+27
-26
@@ -442,7 +442,7 @@ void P_UpdateSegLightOffset(seg_t *li)
|
||||
|
||||
extralight = -contrastFixed + FixedMul(light, contrastFixed * 2);
|
||||
|
||||
// Between -1 and 1 for software, -8 and 8 for hardware
|
||||
// Between -2 and 2 for software, -8 and 8 for hardware
|
||||
li->lightOffset = FixedFloor((extralight / 8) + (FRACUNIT / 2)) / FRACUNIT;
|
||||
#ifdef HWRENDER
|
||||
li->hwLightOffset = FixedFloor(extralight + (FRACUNIT / 2)) / FRACUNIT;
|
||||
@@ -537,6 +537,7 @@ static void P_SetupDirectionalLight(void)
|
||||
|
||||
oldmap = gamemap;
|
||||
oldencore = encoremode;
|
||||
return;
|
||||
}
|
||||
|
||||
maplighting.contrast = lighting->light_contrast;
|
||||
@@ -1747,33 +1748,33 @@ static void P_CreateBlockMap(void)
|
||||
|
||||
// Now we simply iterate block-by-block until we reach the end block.
|
||||
for (curblockx = bxstart; curblockx <= bxend; curblockx++)
|
||||
for (curblocky = bystart; curblocky <= byend; curblocky++)
|
||||
for (curblocky = bystart; curblocky <= byend; curblocky++)
|
||||
{
|
||||
size_t b = curblocky * bmapwidth + curblockx;
|
||||
|
||||
if (b >= tot)
|
||||
continue;
|
||||
|
||||
if (!straight && !(LineInBlock((fixed_t)x, (fixed_t)y, (fixed_t)v2x, (fixed_t)v2y, (fixed_t)(curblockx << MAPBTOFRAC), (fixed_t)(curblocky << MAPBTOFRAC))))
|
||||
continue;
|
||||
|
||||
// Increase size of allocated list if necessary
|
||||
if (bmap[b].n >= bmap[b].nalloc)
|
||||
{
|
||||
size_t b = curblocky * bmapwidth + curblockx;
|
||||
|
||||
if (b >= tot)
|
||||
continue;
|
||||
|
||||
if (!straight && !(LineInBlock((fixed_t)x, (fixed_t)y, (fixed_t)v2x, (fixed_t)v2y, (fixed_t)(curblockx << MAPBTOFRAC), (fixed_t)(curblocky << MAPBTOFRAC))))
|
||||
continue;
|
||||
|
||||
// Increase size of allocated list if necessary
|
||||
if (bmap[b].n >= bmap[b].nalloc)
|
||||
{
|
||||
// Graue 02-29-2004: make code more readable, don't realloc a null pointer
|
||||
// (because it crashes for me, and because the comp.lang.c FAQ says so)
|
||||
if (bmap[b].nalloc == 0)
|
||||
bmap[b].nalloc = 8;
|
||||
else
|
||||
bmap[b].nalloc *= 2;
|
||||
bmap[b].list = Z_Realloc(bmap[b].list, bmap[b].nalloc * sizeof (*bmap->list), PU_CACHE, &bmap[b].list);
|
||||
if (!bmap[b].list)
|
||||
I_Error("Out of Memory in P_CreateBlockMap");
|
||||
}
|
||||
|
||||
// Add linedef to end of list
|
||||
bmap[b].list[bmap[b].n++] = (INT32)i;
|
||||
// Graue 02-29-2004: make code more readable, don't realloc a null pointer
|
||||
// (because it crashes for me, and because the comp.lang.c FAQ says so)
|
||||
if (bmap[b].nalloc == 0)
|
||||
bmap[b].nalloc = 8;
|
||||
else
|
||||
bmap[b].nalloc *= 2;
|
||||
bmap[b].list = Z_Realloc(bmap[b].list, bmap[b].nalloc * sizeof (*bmap->list), PU_CACHE, &bmap[b].list);
|
||||
if (!bmap[b].list)
|
||||
I_Error("Out of Memory in P_CreateBlockMap");
|
||||
}
|
||||
|
||||
// Add linedef to end of list
|
||||
bmap[b].list[bmap[b].n++] = (INT32)i;
|
||||
}
|
||||
}
|
||||
|
||||
// Compute the total size of the blockmap.
|
||||
|
||||
+35
-3
@@ -16,7 +16,6 @@
|
||||
#endif
|
||||
|
||||
#include "doomstat.h"
|
||||
#include "dehacked.h"
|
||||
#include "g_game.h"
|
||||
#include "g_input.h"
|
||||
#include "p_local.h"
|
||||
@@ -489,7 +488,7 @@ static void P_DeviceRumbleTick(void)
|
||||
UINT16 low = 0, high = 0;
|
||||
UINT16 lenght = 57; // in ms
|
||||
|
||||
const player_t *player = P_GetLocalPlayerForNum(i);
|
||||
const player_t *player = ((i == 0) ? &players[consoleplayer] : &players[displayplayers[i]]);
|
||||
|
||||
// allow lua to do some crap for spectators
|
||||
if (player->spectator || !player->mo)
|
||||
@@ -614,6 +613,37 @@ static void P_RunQuakes(void)
|
||||
--quake.time;
|
||||
}
|
||||
|
||||
// Reset our Sprite scales and offsets
|
||||
// at the start of our tic
|
||||
// this is just to make things simpler
|
||||
// as we dont have to reset it ourselves after use
|
||||
// done at the start so lua can still overwrite everything
|
||||
static inline void P_ResetSpriteStuff(void)
|
||||
{
|
||||
thinker_t *th;
|
||||
|
||||
if (rendermode == render_none)
|
||||
return;
|
||||
|
||||
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
||||
{
|
||||
mobj_t *mo;
|
||||
|
||||
if (th->function != (actionf_p1)P_MobjThinker) // not a mobj
|
||||
continue;
|
||||
|
||||
mo = (mobj_t *)th;
|
||||
|
||||
if (!mo || (mo->sprite == SPR_NULL) || (mo->flags2 & MF2_DONTDRAW) || (mo->type == MT_SHADOW))
|
||||
continue;
|
||||
|
||||
mo->spritexscale = mo->realxscale;
|
||||
mo->spriteyscale = mo->realyscale;
|
||||
mo->spritexoffset = mo->realxoffset;
|
||||
mo->spriteyoffset = mo->realyoffset;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// P_Ticker
|
||||
//
|
||||
@@ -681,9 +711,9 @@ void P_Ticker(boolean run)
|
||||
if (playeringame[i])
|
||||
G_WriteDemoTiccmd(&players[i].cmd, i);
|
||||
}
|
||||
|
||||
if (demo.playback)
|
||||
{
|
||||
|
||||
#ifdef DEMO_COMPAT_100
|
||||
if (demo.version == 0x0001)
|
||||
{
|
||||
@@ -715,6 +745,8 @@ void P_Ticker(boolean run)
|
||||
ps_lua_mobjhooks.value.i = 0;
|
||||
ps_checkposition_calls.value.i = 0;
|
||||
|
||||
P_ResetSpriteStuff();
|
||||
|
||||
PS_START_TIMING(ps_lua_prethinkframe_time);
|
||||
LUA_HookPreThinkFrame();
|
||||
PS_STOP_TIMING(ps_lua_prethinkframe_time);
|
||||
|
||||
+26
-102
@@ -972,17 +972,6 @@ fixed_t P_GetPlayerSpinHeight(player_t *player)
|
||||
return FixedMul(FixedMul(player->mo->info->height, player->mo->scale),2*FRACUNIT/3);
|
||||
}
|
||||
|
||||
//
|
||||
// P_GetLocalPlayerForNum
|
||||
//
|
||||
// Returns the player
|
||||
// on the local machine for given number.
|
||||
//
|
||||
player_t *P_GetLocalPlayerForNum(UINT8 pnum)
|
||||
{
|
||||
return (pnum == 0 ? &players[consoleplayer] : &players[displayplayers[pnum]]);
|
||||
}
|
||||
|
||||
//
|
||||
// P_IsLocalPlayer
|
||||
//
|
||||
@@ -3003,28 +2992,21 @@ static void CV_PlayerCam4_OnChange(void)
|
||||
}
|
||||
|
||||
consvar_t cv_cam_dist[MAXSPLITSCREENPLAYERS] = {
|
||||
{"cam_dist", "160", CV_FLOAT|CV_SAVE|CV_CALL|CV_NOINIT, NULL, CV_PlayerCam1_OnChange, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam_dist", "160", CV_FLOAT|CV_SAVE|CV_CALL|CV_NOINIT, NULL, CV_PlayerCam1_OnChange, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam2_dist", "160", CV_FLOAT|CV_SAVE|CV_CALL|CV_NOINIT, NULL, CV_PlayerCam2_OnChange, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam3_dist", "160", CV_FLOAT|CV_SAVE|CV_CALL|CV_NOINIT, NULL, CV_PlayerCam3_OnChange, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam4_dist", "160", CV_FLOAT|CV_SAVE|CV_CALL|CV_NOINIT, NULL, CV_PlayerCam4_OnChange, 0, NULL, NULL, 0, 0, NULL}
|
||||
};
|
||||
|
||||
consvar_t cv_cam_height[MAXSPLITSCREENPLAYERS] = {
|
||||
{"cam_height", "50", CV_FLOAT|CV_SAVE|CV_CALL|CV_NOINIT, NULL, CV_PlayerCam1_OnChange, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam_height", "50", CV_FLOAT|CV_SAVE|CV_CALL|CV_NOINIT, NULL, CV_PlayerCam1_OnChange, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam2_height", "50", CV_FLOAT|CV_SAVE|CV_CALL|CV_NOINIT, NULL, CV_PlayerCam2_OnChange, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam3_height", "50", CV_FLOAT|CV_SAVE|CV_CALL|CV_NOINIT, NULL, CV_PlayerCam3_OnChange, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam4_height", "50", CV_FLOAT|CV_SAVE|CV_CALL|CV_NOINIT, NULL, CV_PlayerCam4_OnChange, 0, NULL, NULL, 0, 0, NULL},
|
||||
};
|
||||
|
||||
consvar_t cv_cam_pitch[MAXSPLITSCREENPLAYERS] = {
|
||||
{"cam_pitch", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam2_pitch", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam3_pitch", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam4_pitch", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}
|
||||
};
|
||||
|
||||
consvar_t cv_cam_still[MAXSPLITSCREENPLAYERS] = {
|
||||
{"cam_still", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam_still", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam2_still", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam3_still", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam4_still", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}
|
||||
@@ -3032,7 +3014,7 @@ consvar_t cv_cam_still[MAXSPLITSCREENPLAYERS] = {
|
||||
|
||||
static CV_PossibleValue_t cam_speed_cons_t[] = {{0, "MIN"}, {1*FRACUNIT, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_cam_speed[MAXSPLITSCREENPLAYERS] = {
|
||||
{"cam_speed", "0.4", CV_FLOAT|CV_SAVE, cam_speed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam_speed", "0.4", CV_FLOAT|CV_SAVE, cam_speed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam2_speed", "0.4", CV_FLOAT|CV_SAVE, cam_speed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam3_speed", "0.4", CV_FLOAT|CV_SAVE, cam_speed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam4_speed", "0.4", CV_FLOAT|CV_SAVE, cam_speed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}
|
||||
@@ -3041,14 +3023,14 @@ consvar_t cv_cam_speed[MAXSPLITSCREENPLAYERS] = {
|
||||
|
||||
static CV_PossibleValue_t cam_rotate_cons_t[] = {{-720, "MIN"}, {720, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_cam_rotate[MAXSPLITSCREENPLAYERS] = {
|
||||
{"cam_rotate", "0", CV_CALL|CV_NOINIT, cam_rotate_cons_t, CV_CamRotate_OnChange, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam_rotate", "0", CV_CALL|CV_NOINIT, cam_rotate_cons_t, CV_CamRotate_OnChange, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam2_rotate", "0", CV_CALL|CV_NOINIT, cam_rotate_cons_t, CV_CamRotate2_OnChange, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam3_rotate", "0", CV_CALL|CV_NOINIT, cam_rotate_cons_t, CV_CamRotate3_OnChange, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam4_rotate", "0", CV_CALL|CV_NOINIT, cam_rotate_cons_t, CV_CamRotate4_OnChange, 0, NULL, NULL, 0, 0, NULL}
|
||||
};
|
||||
|
||||
consvar_t cv_cam_timeover[MAXSPLITSCREENPLAYERS] = {
|
||||
{"cam_timeover", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam_timeover", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam2_timeover", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam3_timeover", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam4_timeover", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}
|
||||
@@ -3056,7 +3038,7 @@ consvar_t cv_cam_timeover[MAXSPLITSCREENPLAYERS] = {
|
||||
|
||||
static CV_PossibleValue_t freecam_speed_cons_t[] = {{0, "MIN"}, {10, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_freecam_speed[MAXSPLITSCREENPLAYERS] = {
|
||||
{"freecam_speed", "1", CV_SAVE, freecam_speed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"freecam_speed", "1", CV_SAVE, freecam_speed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"freecam2_speed", "1", CV_SAVE, freecam_speed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"freecam3_speed", "1", CV_SAVE, freecam_speed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"freecam4_speed", "1", CV_SAVE, freecam_speed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}
|
||||
@@ -3070,13 +3052,13 @@ consvar_t cv_actionmovie = {"actionmovie", "Off", CV_SAVE, CV_OnOff, NULL, 0, NU
|
||||
|
||||
consvar_t cv_screenquake = {"quakescreenshake", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
static CV_PossibleValue_t cam_lookbackmom_cons_t[] = {{0, "Off"}, {1, "On"}, {2, "Double"}, {0, NULL}};
|
||||
static CV_PossibleValue_t lookbackmom_cons_t[] = {{0, "Off"}, {1, "On"}, {2, "Double"}, {0, NULL}};
|
||||
|
||||
consvar_t cv_cam_lookbackmom[MAXSPLITSCREENPLAYERS] = {
|
||||
{"cameralookbackmom", "Off", CV_SAVE, cam_lookbackmom_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cameralookbackmom2", "Off", CV_SAVE, cam_lookbackmom_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cameralookbackmom3", "Off", CV_SAVE, cam_lookbackmom_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cameralookbackmom4", "Off", CV_SAVE, cam_lookbackmom_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}
|
||||
consvar_t cv_lookbackmom[MAXSPLITSCREENPLAYERS] = {
|
||||
{"cameralookbackmom", "Off", CV_SAVE, lookbackmom_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cameralookbackmom2", "Off", CV_SAVE, lookbackmom_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cameralookbackmom3", "Off", CV_SAVE, lookbackmom_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cameralookbackmom4", "Off", CV_SAVE, lookbackmom_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}
|
||||
};
|
||||
|
||||
fixed_t t_cam_rotate[MAXSPLITSCREENPLAYERS] = {-42, -42, -42, -42};
|
||||
@@ -3691,7 +3673,7 @@ static boolean P_CheckNoclipCameraPosition(player_t *player, camera_t *thiscam,
|
||||
static void P_MoveCameraToSpawn(UINT8 playernum)
|
||||
{
|
||||
camera_t *thiscam = &camera[playernum];
|
||||
player_t *player = P_GetLocalPlayerForNum(playernum);
|
||||
player_t *player = playernum == 0 ? &players[consoleplayer] : &players[displayplayers[playernum]];
|
||||
|
||||
if (!thiscam || !player->mo)
|
||||
return;
|
||||
@@ -3720,8 +3702,8 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
||||
static boolean lookbackactive[MAXSPLITSCREENPLAYERS];
|
||||
static UINT8 lookbackdelay[MAXSPLITSCREENPLAYERS];
|
||||
UINT8 num = 0;
|
||||
angle_t angle = 0, focusangle = 0, focusaiming = 0, pitch = 0;
|
||||
fixed_t x, y, z, dist, distxy, distz, viewpointx, viewpointy, camspeed, camdist, camheight, pviewheight;
|
||||
angle_t angle = 0, focusangle = 0, focusaiming = 0;
|
||||
fixed_t x, y, z, dist, viewpointx, viewpointy, camspeed, camdist, camheight, pviewheight;
|
||||
fixed_t pan, xpan, ypan;
|
||||
INT32 camrotate;
|
||||
boolean camstill, lookback, lookbackdown;
|
||||
@@ -3765,6 +3747,8 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
||||
|
||||
mo = player->mo;
|
||||
|
||||
const boolean vflip = (mo->eflags & MFE_VERTICALFLIP);
|
||||
|
||||
if (cv_cam_timeover[num].value && (player->pflags & PF_TIMEOVER))
|
||||
timeover = (player->kartstuff[k_timeovercam] > 2*TICRATE ? 2 : 1); // 1 for momentum keep, 2 for turnaround
|
||||
else
|
||||
@@ -3822,8 +3806,6 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
||||
if (P_CameraThinker(player, thiscam, resetcalled))
|
||||
return true;
|
||||
|
||||
const boolean vflip = (mo->eflags & MFE_VERTICALFLIP);
|
||||
|
||||
camspeed = cv_cam_speed[num].value;
|
||||
camstill = cv_cam_still[num].value;
|
||||
camrotate = cv_cam_rotate[num].value;
|
||||
@@ -3920,41 +3902,8 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
||||
if (player->kartstuff[k_boostcam])
|
||||
dist -= FixedMul(11*dist/16, player->kartstuff[k_boostcam]);
|
||||
|
||||
if (cv_cam_pitch[num].value)
|
||||
{
|
||||
if (mo->standingslope)
|
||||
{
|
||||
pitch = (angle_t)FixedMul(P_ReturnThrustX(mo, thiscam->angle - mo->standingslope->xydirection, FRACUNIT), (fixed_t)mo->standingslope->zangle);
|
||||
|
||||
if (vflip)
|
||||
{
|
||||
if (pitch >= ANGLE_180)
|
||||
pitch = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pitch < ANGLE_180)
|
||||
pitch = 0;
|
||||
}
|
||||
}
|
||||
pitch = thiscam->pitch + (angle_t)FixedMul(pitch - thiscam->pitch, camspeed/4);
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
distxy = FixedMul(dist, FINECOSINE((pitch>>ANGLETOFINESHIFT) & FINEMASK));
|
||||
else
|
||||
#endif
|
||||
distxy = dist;
|
||||
distz = -FixedMul(dist, FINESINE((pitch>>ANGLETOFINESHIFT) & FINEMASK));
|
||||
}
|
||||
else
|
||||
{
|
||||
distxy = dist;
|
||||
distz = 0;
|
||||
}
|
||||
|
||||
x = mo->x - FixedMul(FINECOSINE((angle>>ANGLETOFINESHIFT) & FINEMASK), distxy);
|
||||
y = mo->y - FixedMul(FINESINE((angle>>ANGLETOFINESHIFT) & FINEMASK), distxy);
|
||||
x = mo->x - FixedMul(FINECOSINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist);
|
||||
y = mo->y - FixedMul(FINESINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist);
|
||||
|
||||
// SRB2Kart: set camera panning
|
||||
if (camstill || resetcalled || player->playerstate == PST_DEAD)
|
||||
@@ -3986,26 +3935,10 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
||||
|
||||
pviewheight = FixedMul(32<<FRACBITS, mo->scale);
|
||||
|
||||
if (cv_cam_pitch[num].value)
|
||||
{
|
||||
if (vflip)
|
||||
{
|
||||
distz = min(-camheight, distz);
|
||||
z = mo->z + mo->height - pviewheight + distz;
|
||||
}
|
||||
else
|
||||
{
|
||||
distz = max(camheight, distz);
|
||||
z = mo->z + pviewheight + distz;
|
||||
}
|
||||
}
|
||||
if (vflip)
|
||||
z = mo->z + mo->height - pviewheight - camheight;
|
||||
else
|
||||
{
|
||||
if (vflip)
|
||||
z = mo->z + mo->height - pviewheight - camheight;
|
||||
else
|
||||
z = mo->z + pviewheight + camheight;
|
||||
}
|
||||
z = mo->z + pviewheight + camheight;
|
||||
|
||||
#ifndef NOCLIPCAM // Disable all z-clipping for noclip cam
|
||||
if (P_CheckNoclipCameraPosition(player, thiscam, x, y, z, resetcalled))
|
||||
@@ -4047,17 +3980,16 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
||||
// when looking back, camera's momentum
|
||||
// should inherit the momentum of the player
|
||||
// if value is 2, add extra
|
||||
if (cv_cam_lookbackmom[num].value && lookback && lookbackdelay[num])
|
||||
if (cv_lookbackmom[num].value && lookback && lookbackdelay[num])
|
||||
{
|
||||
thiscam->momx += cv_cam_lookbackmom[num].value*mo->momx;
|
||||
thiscam->momy += cv_cam_lookbackmom[num].value*mo->momy;
|
||||
thiscam->momx += cv_lookbackmom[num].value*mo->momx;
|
||||
thiscam->momy += cv_lookbackmom[num].value*mo->momy;
|
||||
}
|
||||
|
||||
thiscam->momz = FixedMul(z - thiscam->z, camspeed/2);
|
||||
}
|
||||
|
||||
thiscam->pan = pan;
|
||||
thiscam->pitch = pitch;
|
||||
|
||||
// compute aming to look the viewed point
|
||||
f1 = viewpointx-thiscam->x;
|
||||
@@ -4065,17 +3997,9 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
||||
dist = FixedHypot(f1, f2);
|
||||
|
||||
if (vflip)
|
||||
{
|
||||
angle = R_PointToAngle2(0, thiscam->z + thiscam->height, dist, mo->z + mo->height - P_GetPlayerHeight(player));
|
||||
if (thiscam->pitch < ANGLE_180 && thiscam->pitch > angle)
|
||||
angle += (thiscam->pitch - angle)/2;
|
||||
}
|
||||
else
|
||||
{
|
||||
angle = R_PointToAngle2(0, thiscam->z, dist, mo->z + P_GetPlayerHeight(player));
|
||||
if (thiscam->pitch >= ANGLE_180 && thiscam->pitch < angle)
|
||||
angle -= (angle - thiscam->pitch)/2;
|
||||
}
|
||||
|
||||
if (player->playerstate != PST_DEAD && !((player->pflags & PF_NIGHTSMODE) && player->exiting))
|
||||
angle += (focusaiming < ANGLE_180 ? focusaiming/2 : InvAngle(InvAngle(focusaiming)/2)); // overcomplicated version of '((signed)focusaiming)/2;'
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
|
||||
#include "screen.h" // MAXVIDWIDTH, MAXVIDHEIGHT
|
||||
|
||||
#define MAP_ICON_WIDTH 160
|
||||
#define MAP_ICON_HEIGHT 100
|
||||
|
||||
//
|
||||
// ClipWallSegment
|
||||
// Clips the given range of columns
|
||||
|
||||
@@ -57,7 +57,7 @@ static constexpr UINT8 R_GetColumnTranslucent(drawcolumndata_t* dc, UINT8 * rest
|
||||
}
|
||||
|
||||
template<DrawColumnType Type>
|
||||
static constexpr UINT8 R_DrawColumnPixel(drawcolumndata_t* dc, UINT8 * restrict dest, UINT32 bit, const UINT8 * restrict source, const UINT8 * restrict colormap)
|
||||
static constexpr UINT8 R_DrawColumnPixel(drawcolumndata_t* dc, UINT8 * restrict dest, UINT32 bit, const restrict UINT8 *source, const restrict UINT8 *colormap)
|
||||
{
|
||||
UINT8 col = source[bit];
|
||||
|
||||
@@ -217,7 +217,7 @@ static void R_DrawColumnTemplate(drawcolumndata_t *dc)
|
||||
{
|
||||
if (frac < 0)
|
||||
// adjust in case we underread
|
||||
frac += fracstep;
|
||||
frac += FRACUNIT;
|
||||
|
||||
// texture has no height, so just go
|
||||
while (--count >= 0)
|
||||
|
||||
-33
@@ -492,7 +492,6 @@ void R_CreateInterpolator_Polyobj(thinker_t *thinker, polyobj_t *polyobj)
|
||||
|
||||
interp->polyobj.oldcx = interp->polyobj.bakcx = polyobj->centerPt.x;
|
||||
interp->polyobj.oldcy = interp->polyobj.bakcy = polyobj->centerPt.y;
|
||||
interp->polyobj.oldangle = interp->polyobj.bakangle = polyobj->angle;
|
||||
}
|
||||
|
||||
/*void R_CreateInterpolator_DynSlope(thinker_t *thinker, pslope_t *slope)
|
||||
@@ -516,15 +515,6 @@ void R_InitializeLevelInterpolators(void)
|
||||
levelinterpolators = NULL;
|
||||
}
|
||||
|
||||
static void RecalculatePolyobjectSegAngles(polyobj_t *polyobj)
|
||||
{
|
||||
for (size_t i = 0; i < polyobj->segCount; i++)
|
||||
{
|
||||
seg_t *seg = polyobj->segs[i];
|
||||
seg->angle = R_PointToAngle2(seg->v1->x, seg->v1->y, seg->v2->x, seg->v2->y);
|
||||
}
|
||||
}
|
||||
|
||||
static void UpdateLevelInterpolatorState(levelinterpolator_t *interp)
|
||||
{
|
||||
size_t i;
|
||||
@@ -555,14 +545,10 @@ static void UpdateLevelInterpolatorState(levelinterpolator_t *interp)
|
||||
interp->polyobj.bakvertices[i * 2 ] = interp->polyobj.polyobj->vertices[i]->x;
|
||||
interp->polyobj.bakvertices[i * 2 + 1] = interp->polyobj.polyobj->vertices[i]->y;
|
||||
}
|
||||
|
||||
RecalculatePolyobjectSegAngles(interp->polyobj.polyobj);
|
||||
interp->polyobj.oldcx = interp->polyobj.bakcx;
|
||||
interp->polyobj.oldcy = interp->polyobj.bakcy;
|
||||
interp->polyobj.oldangle = interp->polyobj.bakangle;
|
||||
interp->polyobj.bakcx = interp->polyobj.polyobj->centerPt.x;
|
||||
interp->polyobj.bakcy = interp->polyobj.polyobj->centerPt.y;
|
||||
interp->polyobj.bakangle = interp->polyobj.polyobj->angle;
|
||||
break;
|
||||
/*case LVLINTERP_DynSlope:
|
||||
FV3_Copy(&interp->dynslope.oldo, &interp->dynslope.bako);
|
||||
@@ -644,11 +630,8 @@ void R_ApplyLevelInterpolators(fixed_t frac)
|
||||
interp->polyobj.polyobj->vertices[ii]->x = R_LerpFixed(interp->polyobj.oldvertices[ii * 2 ], interp->polyobj.bakvertices[ii * 2 ], frac);
|
||||
interp->polyobj.polyobj->vertices[ii]->y = R_LerpFixed(interp->polyobj.oldvertices[ii * 2 + 1], interp->polyobj.bakvertices[ii * 2 + 1], frac);
|
||||
}
|
||||
|
||||
RecalculatePolyobjectSegAngles(interp->polyobj.polyobj);
|
||||
interp->polyobj.polyobj->centerPt.x = R_LerpFixed(interp->polyobj.oldcx, interp->polyobj.bakcx, frac);
|
||||
interp->polyobj.polyobj->centerPt.y = R_LerpFixed(interp->polyobj.oldcy, interp->polyobj.bakcy, frac);
|
||||
interp->polyobj.polyobj->angle = R_LerpAngle(interp->polyobj.oldangle, interp->polyobj.bakangle, frac);
|
||||
break;
|
||||
/*case LVLINTERP_DynSlope:
|
||||
R_LerpVector3(&interp->dynslope.oldo, &interp->dynslope.bako, frac, &interp->dynslope.slope->o);
|
||||
@@ -702,11 +685,8 @@ void R_RestoreLevelInterpolators(void)
|
||||
interp->polyobj.polyobj->vertices[ii]->x = interp->polyobj.bakvertices[ii * 2 ];
|
||||
interp->polyobj.polyobj->vertices[ii]->y = interp->polyobj.bakvertices[ii * 2 + 1];
|
||||
}
|
||||
|
||||
RecalculatePolyobjectSegAngles(interp->polyobj.polyobj);
|
||||
interp->polyobj.polyobj->centerPt.x = interp->polyobj.bakcx;
|
||||
interp->polyobj.polyobj->centerPt.y = interp->polyobj.bakcy;
|
||||
interp->polyobj.polyobj->angle = interp->polyobj.bakangle;
|
||||
break;
|
||||
/*case LVLINTERP_DynSlope:
|
||||
FV3_Copy(&interp->dynslope.slope->o, &interp->dynslope.bako);
|
||||
@@ -860,19 +840,6 @@ void R_ResetMobjInterpolationState(mobj_t *mobj)
|
||||
mobj->player->old_frameangle = mobj->player->frameangle;
|
||||
}
|
||||
|
||||
// Reset our Sprite scales and offsets
|
||||
// at the start of the tic
|
||||
// this is just to make things simpler
|
||||
// as we dont have to reset it ourselves after use
|
||||
// done at the start so lua can still overwrite everything
|
||||
|
||||
// technically not interpolation related
|
||||
// but this saves us another thinkerloop and multiple checks lel
|
||||
mobj->spritexscale = mobj->realxscale;
|
||||
mobj->spriteyscale = mobj->realyscale;
|
||||
mobj->spritexoffset = mobj->realxoffset;
|
||||
mobj->spriteyoffset = mobj->realyoffset;
|
||||
|
||||
mobj->resetinterp = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -119,7 +119,6 @@ typedef struct levelinterpolator_s {
|
||||
fixed_t *bakvertices;
|
||||
size_t vertices_size;
|
||||
fixed_t oldcx, oldcy, bakcx, bakcy;
|
||||
angle_t oldangle, bakangle;
|
||||
} polyobj;
|
||||
struct {
|
||||
pslope_t *slope;
|
||||
|
||||
+5
-6
@@ -1569,15 +1569,14 @@ void R_RegisterEngineStuff(void)
|
||||
CV_RegisterVar(&cv_chasecam[i]);
|
||||
|
||||
CV_RegisterVar(&cv_cam_dist[i]);
|
||||
CV_RegisterVar(&cv_cam_height[i]);
|
||||
CV_RegisterVar(&cv_cam_pitch[i]);
|
||||
CV_RegisterVar(&cv_cam_speed[i]);
|
||||
CV_RegisterVar(&cv_cam_timeover[i]);
|
||||
CV_RegisterVar(&cv_cam_lookbackmom[i]);
|
||||
CV_RegisterVar(&cv_cam_still[i]);
|
||||
CV_RegisterVar(&cv_cam_height[i]);
|
||||
CV_RegisterVar(&cv_cam_speed[i]);
|
||||
CV_RegisterVar(&cv_cam_rotate[i]);
|
||||
|
||||
CV_RegisterVar(&cv_cam_timeover[i]);
|
||||
CV_RegisterVar(&cv_freecam_speed[i]);
|
||||
|
||||
CV_RegisterVar(&cv_lookbackmom[i]);
|
||||
}
|
||||
|
||||
CV_RegisterVar(&cv_tilting);
|
||||
|
||||
+2
-2
@@ -108,7 +108,7 @@ FUNCINLINE static ATTRINLINE PUREFUNC INT32 R_PointOnSide(fixed_t x, fixed_t y,
|
||||
|
||||
// This is not as accurate
|
||||
// SHOULD NOT BE USED FOR ANYTHING GAMEPLAY RELATED!!
|
||||
FUNCINLINE static ATTRINLINE PUREFUNC INT32 R_PointOnSideFast(fixed_t x, fixed_t y, const node_t* restrict node)
|
||||
FUNCINLINE static ATTRINLINE PUREFUNC INT32 R_PointOnSideFast(fixed_t x, fixed_t y, const node_t *node)
|
||||
{
|
||||
// use cross product to determine side quickly
|
||||
INT64 v = ((INT64)y - node->y) * node->dx - ((INT64)x - node->x) * node->dy;
|
||||
@@ -201,7 +201,7 @@ extern consvar_t cv_secbright;
|
||||
|
||||
extern consvar_t cv_randomdirlight;
|
||||
|
||||
FUNCINLINE static ATTRINLINE INT32 R_GetSoftLightlevel(INT32 llevel)
|
||||
static inline INT32 R_GetSoftLightlevel(INT32 llevel)
|
||||
{
|
||||
return CLAMP(llevel, cv_secbright.value, 255) >> LIGHTSEGSHIFT;
|
||||
}
|
||||
|
||||
-159
@@ -451,124 +451,6 @@ void *Patch_CreateGL(patch_t *patch)
|
||||
}
|
||||
#endif // HWRENDER
|
||||
|
||||
//
|
||||
// R_MaskedFlatToPatch
|
||||
//
|
||||
// Convert raw pixels to a patch.
|
||||
//
|
||||
void *R_PixelsToPatch(UINT8 *raw, INT16 width, INT16 height, INT16 leftoffset, INT16 topoffset, size_t *destsize)
|
||||
{
|
||||
INT16 x, y;
|
||||
UINT8 *img;
|
||||
UINT8 *imgptr = imgbuf;
|
||||
UINT8 *colpointers, *startofspan;
|
||||
size_t size = 0;
|
||||
|
||||
if (!raw)
|
||||
return NULL;
|
||||
|
||||
// Write image size and offset
|
||||
WRITEINT16(imgptr, width);
|
||||
WRITEINT16(imgptr, height);
|
||||
WRITEINT16(imgptr, leftoffset);
|
||||
WRITEINT16(imgptr, topoffset);
|
||||
|
||||
// Leave placeholder to column pointers
|
||||
colpointers = imgptr;
|
||||
imgptr += width*4;
|
||||
|
||||
// Write columns
|
||||
for (x = 0; x < width; x++)
|
||||
{
|
||||
int lastStartY = 0;
|
||||
int spanSize = 0;
|
||||
startofspan = NULL;
|
||||
|
||||
// Write column pointer
|
||||
WRITEINT32(colpointers, imgptr - imgbuf);
|
||||
|
||||
// Write pixels
|
||||
for (y = 0; y < height; y++)
|
||||
{
|
||||
UINT8 pixel = raw[((y * width) + x)];
|
||||
UINT8 opaque = (pixel != 0xf7); // If not 247 (0xf7), we have a pixel
|
||||
|
||||
// End span if we have a transparent pixel
|
||||
if (!opaque)
|
||||
{
|
||||
if (startofspan)
|
||||
WRITEUINT8(imgptr, 0);
|
||||
startofspan = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Start new column if we need to
|
||||
if (!startofspan || spanSize == 255)
|
||||
{
|
||||
int writeY = y;
|
||||
|
||||
// If we reached the span size limit, finish the previous span
|
||||
if (startofspan)
|
||||
WRITEUINT8(imgptr, 0);
|
||||
|
||||
if (y > 254)
|
||||
{
|
||||
// Make sure we're aligned to 254
|
||||
if (lastStartY < 254)
|
||||
{
|
||||
WRITEUINT8(imgptr, 254);
|
||||
WRITEUINT8(imgptr, 0);
|
||||
imgptr += 2;
|
||||
lastStartY = 254;
|
||||
}
|
||||
|
||||
// Write stopgap empty spans if needed
|
||||
writeY = y - lastStartY;
|
||||
|
||||
while (writeY > 254)
|
||||
{
|
||||
WRITEUINT8(imgptr, 254);
|
||||
WRITEUINT8(imgptr, 0);
|
||||
imgptr += 2;
|
||||
writeY -= 254;
|
||||
}
|
||||
}
|
||||
|
||||
startofspan = imgptr;
|
||||
WRITEUINT8(imgptr, writeY);
|
||||
imgptr += 2;
|
||||
spanSize = 0;
|
||||
|
||||
lastStartY = y;
|
||||
}
|
||||
|
||||
// Write the pixel
|
||||
WRITEUINT8(imgptr, pixel);
|
||||
spanSize++;
|
||||
startofspan[1] = spanSize;
|
||||
}
|
||||
|
||||
if (startofspan)
|
||||
WRITEUINT8(imgptr, 0);
|
||||
|
||||
WRITEUINT8(imgptr, 0xFF);
|
||||
}
|
||||
|
||||
size = imgptr-imgbuf;
|
||||
img = Z_Malloc(size, PU_STATIC, NULL);
|
||||
memcpy(img, imgbuf, size);
|
||||
|
||||
if (destsize != NULL)
|
||||
*destsize = size;
|
||||
|
||||
patch_t *converted = Patch_Create((softwarepatch_t *)img, size, NULL);
|
||||
#ifdef HWRENDER
|
||||
Patch_CreateGL(converted);
|
||||
#endif
|
||||
Z_Free(img);
|
||||
|
||||
return converted;
|
||||
}
|
||||
|
||||
//
|
||||
// R_MaskedFlatToPatch
|
||||
@@ -733,44 +615,3 @@ UINT16 R_GetPatchPixel(patch_t *patch, INT32 x, INT32 y, boolean flip)
|
||||
|
||||
return 0xFF00;
|
||||
}
|
||||
|
||||
void R_PatchToPixels(patch_t *patch, UINT8 *dst)
|
||||
{
|
||||
const INT16 width = patch->width;
|
||||
|
||||
// init out destination to cyan so we can easily check for it when we convert it back to a patch
|
||||
memset(dst, 0xf7, (width * patch->height)); // should this be here or should this be taken care of before passing it?
|
||||
|
||||
for (INT32 x = 0; x < width; ++x)
|
||||
{
|
||||
INT32 y = 0;
|
||||
INT32 prevdelta = -1;
|
||||
|
||||
column_t *column = (column_t *)((UINT8 *)patch->columns + (patch->columnofs[x]));
|
||||
|
||||
while (column->topdelta != 0xff)
|
||||
{
|
||||
INT32 topdelta = column->topdelta;
|
||||
|
||||
if (topdelta <= prevdelta)
|
||||
topdelta += prevdelta;
|
||||
|
||||
prevdelta = topdelta;
|
||||
|
||||
for (; y-topdelta < column->length; ++y)
|
||||
{
|
||||
UINT8 pixel = 0;
|
||||
|
||||
if (y >= topdelta)
|
||||
{
|
||||
UINT8 *source = (UINT8*)(column) + 3;
|
||||
pixel = source[y-topdelta];
|
||||
}
|
||||
|
||||
dst[(y*width) + x] = pixel;
|
||||
}
|
||||
|
||||
column = (column_t *)((UINT8 *)column + column->length + 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
+62
-64
@@ -1,64 +1,62 @@
|
||||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 2018-2019 by Jaime "Lactozilla" Passos.
|
||||
// Copyright (C) 2019 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
// See the 'LICENSE' file for more details.
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \file r_patch.h
|
||||
/// \brief Patch generation.
|
||||
|
||||
#ifndef __R_PATCH__
|
||||
#define __R_PATCH__
|
||||
|
||||
#include "r_defs.h"
|
||||
|
||||
// Structs
|
||||
typedef enum
|
||||
{
|
||||
ROTAXIS_X, // Roll (the default)
|
||||
ROTAXIS_Y, // Pitch
|
||||
ROTAXIS_Z // Yaw
|
||||
} rotaxis_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
INT32 x, y;
|
||||
rotaxis_t rotaxis;
|
||||
} spriteframepivot_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
spriteframepivot_t pivot[64];
|
||||
boolean available;
|
||||
} spriteinfo_t;
|
||||
|
||||
// Patch functions
|
||||
patch_t *Patch_Create(softwarepatch_t *source, size_t srcsize, void *dest);
|
||||
void Patch_Free(patch_t *patch);
|
||||
|
||||
#define Patch_FreeTag(tagnum) Patch_FreeTags(tagnum, tagnum)
|
||||
void Patch_FreeTags(INT32 lowtag, INT32 hightag);
|
||||
|
||||
#ifdef HWRENDER
|
||||
void *Patch_AllocateHardwarePatch(patch_t *patch);
|
||||
void *Patch_CreateGL(patch_t *patch);
|
||||
#endif
|
||||
|
||||
// Conversions between patches / flats / textures...
|
||||
boolean R_CheckIfPatch(lumpnum_t lump);
|
||||
|
||||
// SpriteInfo
|
||||
extern spriteinfo_t spriteinfo[NUMSPRITES];
|
||||
void R_LoadSpriteInfoLumps(UINT16 wadnum, UINT16 numlumps);
|
||||
void R_ParseSPRTINFOLump(UINT16 wadNum, UINT16 lumpNum);
|
||||
|
||||
void *R_MaskedFlatToPatch(UINT16 *raw, INT16 width, INT16 height, INT16 leftoffset, INT16 topoffset, size_t *destsize);
|
||||
void *R_PixelsToPatch(UINT8 *raw, INT16 width, INT16 height, INT16 leftoffset, INT16 topoffset, size_t *destsize);
|
||||
UINT16 R_GetPatchPixel(patch_t *patch, INT32 x, INT32 y, boolean flip);
|
||||
void R_PatchToPixels(patch_t *patch, UINT8 *dst); // Important: dst must have enough space for patch->width*patch->height pixels!
|
||||
|
||||
#endif // __R_PATCH__
|
||||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 2018-2019 by Jaime "Lactozilla" Passos.
|
||||
// Copyright (C) 2019 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
// See the 'LICENSE' file for more details.
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \file r_patch.h
|
||||
/// \brief Patch generation.
|
||||
|
||||
#ifndef __R_PATCH__
|
||||
#define __R_PATCH__
|
||||
|
||||
#include "r_defs.h"
|
||||
|
||||
// Structs
|
||||
typedef enum
|
||||
{
|
||||
ROTAXIS_X, // Roll (the default)
|
||||
ROTAXIS_Y, // Pitch
|
||||
ROTAXIS_Z // Yaw
|
||||
} rotaxis_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
INT32 x, y;
|
||||
rotaxis_t rotaxis;
|
||||
} spriteframepivot_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
spriteframepivot_t pivot[64];
|
||||
boolean available;
|
||||
} spriteinfo_t;
|
||||
|
||||
// Patch functions
|
||||
patch_t *Patch_Create(softwarepatch_t *source, size_t srcsize, void *dest);
|
||||
void Patch_Free(patch_t *patch);
|
||||
|
||||
#define Patch_FreeTag(tagnum) Patch_FreeTags(tagnum, tagnum)
|
||||
void Patch_FreeTags(INT32 lowtag, INT32 hightag);
|
||||
|
||||
#ifdef HWRENDER
|
||||
void *Patch_AllocateHardwarePatch(patch_t *patch);
|
||||
void *Patch_CreateGL(patch_t *patch);
|
||||
#endif
|
||||
|
||||
// Conversions between patches / flats / textures...
|
||||
boolean R_CheckIfPatch(lumpnum_t lump);
|
||||
|
||||
// SpriteInfo
|
||||
extern spriteinfo_t spriteinfo[NUMSPRITES];
|
||||
void R_LoadSpriteInfoLumps(UINT16 wadnum, UINT16 numlumps);
|
||||
void R_ParseSPRTINFOLump(UINT16 wadNum, UINT16 lumpNum);
|
||||
|
||||
void *R_MaskedFlatToPatch(UINT16 *raw, INT16 width, INT16 height, INT16 leftoffset, INT16 topoffset, size_t *destsize);
|
||||
UINT16 R_GetPatchPixel(patch_t *patch, INT32 x, INT32 y, boolean flip);
|
||||
|
||||
#endif // __R_PATCH__
|
||||
+9
-9
@@ -1072,15 +1072,15 @@ void R_DrawSinglePlane(drawspandata_t* ds, visplane_t *pl, boolean allow_paralle
|
||||
{
|
||||
if ((pl->ffloor->flags & FF_CUTEXTRA) && (rover->flags & FF_EXTRA))
|
||||
{
|
||||
if (pl->ffloor->flags & FF_EXTRA)
|
||||
{
|
||||
// The plane is from an extra 3D floor... Check the flags so
|
||||
// there are no undesired cuts.
|
||||
if (((pl->ffloor->flags & (FF_FOG|FF_SWIMMABLE)) == (rover->flags & (FF_FOG|FF_SWIMMABLE)))
|
||||
&& pl->height < *rover->topheight
|
||||
&& pl->height > *rover->bottomheight)
|
||||
return;
|
||||
}
|
||||
if (!(rover->flags & FF_EXTRA))
|
||||
continue;
|
||||
|
||||
// The plane is from an extra 3D floor... Check the flags so
|
||||
// there are no undesired cuts.
|
||||
if (((pl->ffloor->flags & (FF_FOG|FF_SWIMMABLE)) == (rover->flags & (FF_FOG|FF_SWIMMABLE)))
|
||||
&& pl->height < *rover->topheight
|
||||
&& pl->height > *rover->bottomheight)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+173
-58
@@ -42,10 +42,12 @@ static void Command_RestartMusic_f(void); //mhhhm amiga type filters here i come
|
||||
static void Command_ShowMusicCredit_f(void);
|
||||
|
||||
// Sound system toggles
|
||||
#ifndef NO_MIDI
|
||||
static void GameMIDIMusic_OnChange(void);
|
||||
#endif
|
||||
static void GameSounds_OnChange(void);
|
||||
static void GameMusic_OnChange(void);
|
||||
|
||||
static void SoundPrecache_OnChange(void);
|
||||
static void GameDigiMusic_OnChange(void);
|
||||
static void BufferSize_OnChange(void);
|
||||
|
||||
#ifdef HAVE_OPENMPT
|
||||
@@ -88,8 +90,11 @@ consvar_t cv_samesoundlimit = {"samesoundlimit", "0", CV_SAVE, samesoundlimit_co
|
||||
//consvar_t cv_resetmusic = {"resetmusic", "No", CV_SAVE|CV_NOSHOWHELP, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
// Sound system toggles, saved into the config
|
||||
consvar_t cv_gamedigimusic = {"digimusic", "On", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, GameMusic_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_gamesounds = {"sounds", "On", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, GameSounds_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_gamedigimusic = {"digimusic", "On", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, GameDigiMusic_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
#ifndef NO_MIDI
|
||||
consvar_t cv_gamemidimusic = {"midimusic", "On", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, GameMIDIMusic_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
#endif
|
||||
consvar_t cv_gamesounds = {"sounds", "On", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, GameSounds_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_playmusicifunfocused = {"playmusicifunfocused", "No", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_playsoundifunfocused = {"playsoundsifunfocused", "No", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
@@ -281,6 +286,9 @@ void S_RegisterSoundStuff(void)
|
||||
//CV_RegisterVar(&cv_resetmusic);
|
||||
CV_RegisterVar(&cv_gamesounds);
|
||||
CV_RegisterVar(&cv_gamedigimusic);
|
||||
#ifndef NO_MIDI
|
||||
CV_RegisterVar(&cv_gamemidimusic);
|
||||
#endif
|
||||
|
||||
CV_RegisterVar(&cv_samesoundlimit);
|
||||
|
||||
@@ -359,7 +367,10 @@ lumpnum_t S_GetSfxLumpNum(sfxinfo_t *sfx)
|
||||
|
||||
boolean S_SoundDisabled(void)
|
||||
{
|
||||
return (sound_disabled || (window_notinfocus && !cv_playsoundifunfocused.value));
|
||||
return (
|
||||
sound_disabled ||
|
||||
( window_notinfocus && ! cv_playsoundifunfocused.value )
|
||||
);
|
||||
}
|
||||
|
||||
boolean S_PrecacheSound(void)
|
||||
@@ -678,7 +689,10 @@ void S_StopSound(void *origin)
|
||||
// Updates music & sounds
|
||||
//
|
||||
static INT32 actualsfxvolume; // check for change through console
|
||||
static INT32 actualmusicvolume;
|
||||
static INT32 actualdigmusicvolume;
|
||||
#ifndef NO_MIDI
|
||||
static INT32 actualmidimusicvolume;
|
||||
#endif
|
||||
|
||||
void S_UpdateSounds(void)
|
||||
{
|
||||
@@ -690,19 +704,15 @@ void S_UpdateSounds(void)
|
||||
listener_t listener[MAXSPLITSCREENPLAYERS];
|
||||
mobj_t *listenmobj[MAXSPLITSCREENPLAYERS];
|
||||
|
||||
#ifndef NO_MIDI
|
||||
const boolean currentmidi = (I_SongType() == MU_MID);
|
||||
#endif
|
||||
|
||||
// Update sound/music volumes, if changed manually at console
|
||||
if (actualsfxvolume != cv_soundvolume.value)
|
||||
S_SetSfxVolume(cv_soundvolume.value);
|
||||
if (actualdigmusicvolume != cv_digmusicvolume.value)
|
||||
S_SetDigMusicVolume(cv_digmusicvolume.value);
|
||||
#ifndef NO_MIDI
|
||||
if (actualmusicvolume != (currentmidi ? cv_midimusicvolume.value : cv_digmusicvolume.value))
|
||||
#else
|
||||
if (actualmusicvolume != cv_digmusicvolume.value)
|
||||
if (actualmidimusicvolume != cv_midimusicvolume.value)
|
||||
S_SetMIDIMusicVolume(cv_midimusicvolume.value);
|
||||
#endif
|
||||
S_SetMusicVolume(-1);
|
||||
|
||||
memset(listener, 0, sizeof(listener));
|
||||
|
||||
@@ -1502,8 +1512,7 @@ void S_ShowSpecifiedMusicCredit(const char *musname)
|
||||
{
|
||||
musicdef_t *def;
|
||||
|
||||
if (music_disabled)
|
||||
return;
|
||||
if (digital_disabled) return;
|
||||
|
||||
if (!cv_songcredits.value || demo.rewinding)
|
||||
return;
|
||||
@@ -1533,9 +1542,19 @@ void S_ShowMusicCredit(void)
|
||||
/// Music Status
|
||||
/// ------------------------
|
||||
|
||||
boolean S_DigMusicDisabled(void)
|
||||
{
|
||||
return digital_disabled;
|
||||
}
|
||||
|
||||
boolean S_MIDIMusicDisabled(void)
|
||||
{
|
||||
return midi_disabled; // SRB2Kart: defined as "true" w/ NO_MIDI
|
||||
}
|
||||
|
||||
boolean S_MusicDisabled(void)
|
||||
{
|
||||
return (music_disabled);
|
||||
return (midi_disabled && digital_disabled);
|
||||
}
|
||||
|
||||
boolean S_MusicPlaying(void)
|
||||
@@ -1624,25 +1643,6 @@ UINT32 S_GetMusicPosition(void)
|
||||
/// Music Playback
|
||||
/// ------------------------
|
||||
|
||||
static lumpnum_t S_GetMusicLumpNum(const char *mname)
|
||||
{
|
||||
if (S_MusicExists(mname, false, true)) // check non midis first
|
||||
return W_GetNumForName(va("o_%s", mname));
|
||||
else if (S_MusicExists(mname, true, false))
|
||||
{
|
||||
#ifdef NO_MIDI
|
||||
CONS_Alert(CONS_ERROR, "A MIDI music lump %.6s was found,\nbut SRB2Kart does not support MIDI output.\nWe apologise for the inconvenience.\n", mname);
|
||||
return LUMPERROR;
|
||||
#else
|
||||
return W_GetNumForName(va("d_%s", mname));
|
||||
#endif
|
||||
}
|
||||
|
||||
CONS_Alert(CONS_ERROR, "Music %.6s could not be loaded: lump not found!\n", mname);
|
||||
|
||||
return LUMPERROR;
|
||||
}
|
||||
|
||||
static boolean S_LoadMusic(const char *mname)
|
||||
{
|
||||
lumpnum_t mlumpnum;
|
||||
@@ -1651,10 +1651,27 @@ static boolean S_LoadMusic(const char *mname)
|
||||
if (S_MusicDisabled())
|
||||
return false;
|
||||
|
||||
mlumpnum = S_GetMusicLumpNum(mname);
|
||||
|
||||
if (mlumpnum == LUMPERROR)
|
||||
if (!S_DigMusicDisabled() && S_DigExists(mname))
|
||||
mlumpnum = W_GetNumForName(va("o_%s", mname));
|
||||
else if (!S_MIDIMusicDisabled() && S_MIDIExists(mname))
|
||||
mlumpnum = W_GetNumForName(va("d_%s", mname));
|
||||
else if (S_DigMusicDisabled() && S_DigExists(mname))
|
||||
{
|
||||
CONS_Alert(CONS_NOTICE, "Digital music is disabled!\n");
|
||||
return false;
|
||||
}
|
||||
else if (S_MIDIMusicDisabled() && S_MIDIExists(mname))
|
||||
{
|
||||
#ifdef NO_MIDI
|
||||
CONS_Alert(CONS_ERROR, "A MIDI music lump %.6s was found,\nbut SRB2Kart does not support MIDI output.\nWe apologise for the inconvenience.\n", mname);
|
||||
#else
|
||||
CONS_Alert(CONS_NOTICE, "MIDI music is disabled!\n");
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, M_GetText("Music lump %.6s not found!\n"), mname);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1702,7 +1719,7 @@ static boolean S_PlayMusic(boolean looping, UINT32 fadeinms)
|
||||
return false;
|
||||
}
|
||||
|
||||
S_SetMusicVolume(-1); // initialize music volume
|
||||
S_InitMusicVolume(); // switch between digi and sequence volume
|
||||
|
||||
if (S_MusicNotInFocus())
|
||||
I_SetMusicVolume(0);
|
||||
@@ -1858,24 +1875,47 @@ void S_ResumeAudio(void)
|
||||
I_ResumeSong();
|
||||
}
|
||||
|
||||
void S_SetMusicVolume(INT32 volume)
|
||||
void S_SetMusicVolume(INT32 digvolume, INT32 seqvolume)
|
||||
{
|
||||
if (digvolume < 0)
|
||||
digvolume = cv_digmusicvolume.value;
|
||||
|
||||
#ifdef NO_MIDI
|
||||
consvar_t *musicvolume = &cv_digmusicvolume;
|
||||
(void)seqvolume;
|
||||
#else
|
||||
consvar_t *musicvolume = (I_SongType() == MU_MID) ? &cv_midimusicvolume : &cv_digmusicvolume;
|
||||
if (seqvolume < 0)
|
||||
seqvolume = cv_midimusicvolume.value;
|
||||
#endif
|
||||
|
||||
if (volume < 0)
|
||||
volume = musicvolume->value;
|
||||
if (digvolume < 0 || digvolume > 31)
|
||||
CONS_Alert(CONS_WARNING, "digmusicvolume should be between 0-31\n");
|
||||
CV_SetValue(&cv_digmusicvolume, digvolume&31);
|
||||
actualdigmusicvolume = cv_digmusicvolume.value; //check for change of var
|
||||
|
||||
if (volume < 0 || volume > 31)
|
||||
CONS_Alert(CONS_WARNING, "Music volume should be between 0-31\n");
|
||||
#ifndef NO_MIDI
|
||||
if (seqvolume < 0 || seqvolume > 31)
|
||||
CONS_Alert(CONS_WARNING, "midimusicvolume should be between 0-31\n");
|
||||
CV_SetValue(&cv_midimusicvolume, seqvolume&31);
|
||||
actualmidimusicvolume = cv_midimusicvolume.value; //check for change of var
|
||||
#endif
|
||||
|
||||
CV_SetValue(musicvolume, volume&31);
|
||||
actualmusicvolume = musicvolume->value; //check for change of var
|
||||
#ifndef NO_MIDI
|
||||
seqvolume = 31;
|
||||
#endif
|
||||
|
||||
I_SetMusicVolume(volume&31);
|
||||
switch(I_SongType())
|
||||
{
|
||||
#ifndef NO_MIDI
|
||||
case MU_MID:
|
||||
//case MU_MOD:
|
||||
//case MU_GME:
|
||||
I_SetMusicVolume(seqvolume&31);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
I_SetMusicVolume(digvolume&31);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void S_SetRestoreMusicFadeInCvar(consvar_t *cv)
|
||||
@@ -2116,7 +2156,11 @@ void S_RestartMusic(void)
|
||||
I_ShutdownMusic();
|
||||
I_InitMusic();
|
||||
|
||||
S_SetMusicVolume(-1);
|
||||
#ifdef NO_MIDI
|
||||
S_SetMusicVolume(cv_digmusicvolume.value, -1);
|
||||
#else
|
||||
S_SetMusicVolume(cv_digmusicvolume.value, cv_midimusicvolume.value);
|
||||
#endif
|
||||
|
||||
S_ResetKeepAndSpecialMus();
|
||||
|
||||
@@ -2217,7 +2261,11 @@ static void Command_RestartAudio_f(void)
|
||||
// These must be called or no sound and music until manually set.
|
||||
|
||||
I_SetSfxVolume(cv_soundvolume.value);
|
||||
S_SetMusicVolume(-1);
|
||||
#ifdef NO_MIDI
|
||||
S_SetMusicVolume(cv_digmusicvolume.value, -1);
|
||||
#else
|
||||
S_SetMusicVolume(cv_digmusicvolume.value, cv_midimusicvolume.value);
|
||||
#endif
|
||||
|
||||
S_StartSound(NULL, sfx_strpst);
|
||||
|
||||
@@ -2287,14 +2335,16 @@ static void SoundPrecache_OnChange(void)
|
||||
}
|
||||
}
|
||||
|
||||
void GameMusic_OnChange(void)
|
||||
static void GameDigiMusic_OnChange(void)
|
||||
{
|
||||
if (M_CheckParm("-nomusic") || M_CheckParm("-noaudio"))
|
||||
return;
|
||||
else if (M_CheckParm("-nodigmusic"))
|
||||
return;
|
||||
|
||||
if (music_disabled && cv_gamedigimusic.value)
|
||||
if (digital_disabled && cv_gamedigimusic.value)
|
||||
{
|
||||
music_disabled = false;
|
||||
digital_disabled = false;
|
||||
I_StartupSound(); // will return early if initialised
|
||||
I_InitMusic();
|
||||
|
||||
@@ -2305,13 +2355,32 @@ void GameMusic_OnChange(void)
|
||||
else
|
||||
S_ChangeMusicInternal("titles", looptitle);
|
||||
}
|
||||
else if (!music_disabled && !cv_gamedigimusic.value)
|
||||
else if (!digital_disabled && !cv_gamedigimusic.value)
|
||||
{
|
||||
music_disabled = true;
|
||||
S_StopMusic();
|
||||
digital_disabled = true;
|
||||
if (S_MusicType() != MU_MID)
|
||||
{
|
||||
if (midi_disabled)
|
||||
S_StopMusic();
|
||||
else
|
||||
{
|
||||
char mmusic[7];
|
||||
UINT16 mflags;
|
||||
boolean looping;
|
||||
|
||||
if (S_MusicInfo(mmusic, &mflags, &looping) && S_MIDIExists(mmusic))
|
||||
{
|
||||
S_StopMusic();
|
||||
S_ChangeMusic(mmusic, mflags, looping);
|
||||
}
|
||||
else
|
||||
S_StopMusic();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_OPENMPT
|
||||
static void ModFilter_OnChange(void)
|
||||
{
|
||||
@@ -2353,3 +2422,49 @@ static void BufferSize_OnChange(void)
|
||||
if (sound_started)
|
||||
COM_ImmedExecute("restartaudio");
|
||||
}
|
||||
|
||||
#ifndef NO_MIDI
|
||||
static void GameMIDIMusic_OnChange(void)
|
||||
{
|
||||
if (M_CheckParm("-nomusic") || M_CheckParm("-noaudio"))
|
||||
return;
|
||||
else if (M_CheckParm("-nomidimusic"))
|
||||
return;
|
||||
|
||||
if (midi_disabled && cv_gamemidimusic.value)
|
||||
{
|
||||
midi_disabled = false;
|
||||
I_InitMusic();
|
||||
|
||||
S_ResetKeepAndSpecialMus();
|
||||
|
||||
if (Playing())
|
||||
P_RestoreMusic(&players[consoleplayer]);
|
||||
else
|
||||
S_ChangeMusicInternal("titles", looptitle);
|
||||
}
|
||||
else if (!midi_disabled && !cv_gamemidimusic.value)
|
||||
{
|
||||
midi_disabled = true;
|
||||
if (S_MusicType() == MU_MID)
|
||||
{
|
||||
if (digital_disabled)
|
||||
S_StopMusic();
|
||||
else
|
||||
{
|
||||
char mmusic[7];
|
||||
UINT16 mflags;
|
||||
boolean looping;
|
||||
|
||||
if (S_MusicInfo(mmusic, &mflags, &looping) && S_DigExists(mmusic))
|
||||
{
|
||||
S_StopMusic();
|
||||
S_ChangeMusic(mmusic, mflags, looping);
|
||||
}
|
||||
else
|
||||
S_StopMusic();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
+9
-2
@@ -38,7 +38,7 @@ extern consvar_t cv_audbuffersize;
|
||||
//extern consvar_t cv_resetmusic;
|
||||
extern consvar_t cv_gamedigimusic;
|
||||
#ifndef NO_MIDI
|
||||
extern consvar_t cv_midimusicvolume;
|
||||
extern consvar_t cv_gamemidimusic, cv_midimusicvolume;
|
||||
#endif
|
||||
extern consvar_t cv_gamesounds;
|
||||
extern consvar_t cv_playmusicifunfocused;
|
||||
@@ -148,6 +148,8 @@ void S_StopSound(void *origin);
|
||||
// Music Status
|
||||
//
|
||||
|
||||
boolean S_DigMusicDisabled(void);
|
||||
boolean S_MIDIMusicDisabled(void);
|
||||
boolean S_MusicDisabled(void);
|
||||
boolean S_MusicPlaying(void);
|
||||
boolean S_MusicPaused(void);
|
||||
@@ -157,6 +159,8 @@ musictype_t S_MusicType(void);
|
||||
const char *S_MusicName(void);
|
||||
boolean S_MusicInfo(char *mname, UINT16 *mflags, boolean *looping);
|
||||
boolean S_MusicExists(const char *mname, boolean checkMIDI, boolean checkDigi);
|
||||
#define S_DigExists(a) S_MusicExists(a, false, true)
|
||||
#define S_MIDIExists(a) S_MusicExists(a, true, false)
|
||||
|
||||
//
|
||||
// Music Effects
|
||||
@@ -277,7 +281,10 @@ void S_UpdateSounds(void);
|
||||
FUNCMATH fixed_t S_CalculateSoundDistance(fixed_t px1, fixed_t py1, fixed_t pz1, fixed_t px2, fixed_t py2, fixed_t pz2);
|
||||
|
||||
void S_SetSfxVolume(INT32 volume);
|
||||
void S_SetMusicVolume(INT32 volume);
|
||||
void S_SetMusicVolume(INT32 digvolume, INT32 seqvolume);
|
||||
#define S_SetDigMusicVolume(a) S_SetMusicVolume(a,-1)
|
||||
#define S_SetMIDIMusicVolume(a) S_SetMusicVolume(-1,a)
|
||||
#define S_InitMusicVolume() S_SetMusicVolume(-1,-1)
|
||||
|
||||
INT32 S_OriginPlaying(void *origin);
|
||||
INT32 S_IdPlaying(sfxenum_t id);
|
||||
|
||||
+124
-25
@@ -163,13 +163,20 @@ static INT32 firstEntry = 0;
|
||||
static INT32 mousemovex = 0, mousemovey = 0;
|
||||
|
||||
// SDL vars
|
||||
static SDL_Surface *vidSurface = NULL;
|
||||
static SDL_Surface *bufSurface = NULL;
|
||||
static SDL_Surface *icoSurface = NULL;
|
||||
static UINT32 localPalette[256];
|
||||
static SDL_Color localPalette[256];
|
||||
#if 0
|
||||
static SDL_Rect **modeList = NULL;
|
||||
static Uint8 BitsPerPixel = 16;
|
||||
#endif
|
||||
Uint16 realwidth = BASEVIDWIDTH;
|
||||
Uint16 realheight = BASEVIDHEIGHT;
|
||||
static SDL_bool mousegrabok = SDL_TRUE;
|
||||
static SDL_bool wrapmouseok = SDL_FALSE;
|
||||
#define HalfWarpMouse(x,y) if (wrapmouseok) SDL_WarpMouseInWindow(window, (Uint16)(x/2),(Uint16)(y/2))
|
||||
static SDL_bool videoblitok = SDL_FALSE;
|
||||
static SDL_bool exposevideo = SDL_FALSE;
|
||||
static SDL_bool usesdl2soft = SDL_FALSE;
|
||||
static SDL_bool borderlesswindow = SDL_FALSE;
|
||||
@@ -212,6 +219,7 @@ static INT32 windowedModes[MAXWINMODES][2] =
|
||||
static INT32 custom_width = 0;
|
||||
static INT32 custom_height = 0;
|
||||
|
||||
static void Impl_VideoSetupSDLBuffer(void);
|
||||
static void Impl_VideoSetupBuffer(void);
|
||||
static SDL_bool Impl_CreateWindow(SDL_bool fullscreen);
|
||||
static void Impl_SetWindowIcon(void);
|
||||
@@ -477,6 +485,39 @@ static void VID_Command_NumModes_f (void)
|
||||
CONS_Printf(M_GetText("%d video mode(s) available(s)\n"), VID_NumModes());
|
||||
}
|
||||
|
||||
// SDL2 doesn't have SDL_GetVideoSurface or a lot of the SDL_Surface flags that SDL 1.2 had
|
||||
static void SurfaceInfo(const SDL_Surface *infoSurface, const char *SurfaceText)
|
||||
{
|
||||
INT32 vfBPP;
|
||||
|
||||
if (!infoSurface)
|
||||
return;
|
||||
|
||||
if (!SurfaceText)
|
||||
SurfaceText = M_GetText("Unknown Surface");
|
||||
|
||||
vfBPP = infoSurface->format?infoSurface->format->BitsPerPixel:0;
|
||||
|
||||
CONS_Printf("\x82" "%s\n", SurfaceText);
|
||||
CONS_Printf(M_GetText(" %ix%i at %i bit color\n"), infoSurface->w, infoSurface->h, vfBPP);
|
||||
|
||||
if (infoSurface->flags&SDL_PREALLOC)
|
||||
CONS_Printf("%s", M_GetText(" Uses preallocated memory\n"));
|
||||
else
|
||||
CONS_Printf("%s", M_GetText(" Stored in system memory\n"));
|
||||
if (infoSurface->flags&SDL_RLEACCEL)
|
||||
CONS_Printf("%s", M_GetText(" Colorkey RLE acceleration blit\n"));
|
||||
}
|
||||
|
||||
static void VID_Command_Info_f (void)
|
||||
{
|
||||
if (!M_CheckParm("-noblit"))
|
||||
videoblitok = SDL_TRUE;
|
||||
|
||||
SurfaceInfo(bufSurface, M_GetText("Current Engine Mode"));
|
||||
SurfaceInfo(vidSurface, M_GetText("Current Video Mode"));
|
||||
}
|
||||
|
||||
static void VID_Command_ModeList_f(void)
|
||||
{
|
||||
// List windowed modes
|
||||
@@ -677,10 +718,10 @@ static void Impl_HandleWindowEvent(SDL_WindowEvent evt)
|
||||
// Tell game we got focus back, resume music if necessary
|
||||
window_notinfocus = false;
|
||||
|
||||
S_SetMusicVolume(-1);
|
||||
S_InitMusicVolume();
|
||||
|
||||
if (cv_gamesounds.value)
|
||||
S_ResumeAudio(); // resume it
|
||||
S_ResumeAudio(); //resume it
|
||||
|
||||
if (!firsttimeonmouse)
|
||||
{
|
||||
@@ -1299,6 +1340,8 @@ void I_OsPolling(void)
|
||||
static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen)
|
||||
{
|
||||
static SDL_bool wasfullscreen = SDL_FALSE;
|
||||
Uint32 rmask, gmask, bmask, amask;
|
||||
int bpp = 16;
|
||||
int sw_texture_format = SDL_PIXELFORMAT_ABGR8888;
|
||||
|
||||
realwidth = vid.width;
|
||||
@@ -1367,13 +1410,32 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen)
|
||||
SDL_DestroyTexture(texture);
|
||||
}
|
||||
|
||||
if (!usesdl2soft)
|
||||
{
|
||||
sw_texture_format = SDL_PIXELFORMAT_RGB565;
|
||||
}
|
||||
else
|
||||
{
|
||||
bpp = 32;
|
||||
sw_texture_format = SDL_PIXELFORMAT_RGBA8888;
|
||||
}
|
||||
|
||||
texture = SDL_CreateTexture(renderer, sw_texture_format, SDL_TEXTUREACCESS_STREAMING, width, height);
|
||||
|
||||
// Set up SW surface
|
||||
if (vidSurface != NULL)
|
||||
{
|
||||
SDL_FreeSurface(vidSurface);
|
||||
}
|
||||
|
||||
if (vid.buffer)
|
||||
{
|
||||
free(vid.buffer);
|
||||
vid.buffer = NULL;
|
||||
}
|
||||
|
||||
SDL_PixelFormatEnumToMasks(sw_texture_format, &bpp, &rmask, &gmask, &bmask, &amask);
|
||||
vidSurface = SDL_CreateRGBSurface(0, width, height, bpp, rmask, gmask, bmask, amask);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1432,21 +1494,19 @@ void I_FinishUpdate(void)
|
||||
|
||||
if (rendermode == render_soft && vid.screens[0])
|
||||
{
|
||||
void *pixels;
|
||||
int pitch;
|
||||
SDL_LockTexture(texture, NULL, &pixels, &pitch);
|
||||
int step = pitch / 4 - vid.width;
|
||||
UINT32 *restrict dst = pixels;
|
||||
UINT8 *restrict src = vid.screens[0];
|
||||
UINT32 *restrict palette = localPalette;
|
||||
for (INT32 y = 0; y < vid.height; y++)
|
||||
if (!bufSurface) //Double-Check
|
||||
{
|
||||
UINT8 *restrict end = src + vid.width;
|
||||
do *dst++ = palette[*src++];
|
||||
while (src < end);
|
||||
dst += step;
|
||||
Impl_VideoSetupSDLBuffer();
|
||||
}
|
||||
|
||||
if (bufSurface)
|
||||
{
|
||||
SDL_BlitSurface(bufSurface, &src_rect, vidSurface, &src_rect);
|
||||
// Fury -- there's no way around UpdateTexture, the GL backend uses it anyway
|
||||
SDL_LockSurface(vidSurface);
|
||||
SDL_UpdateTexture(texture, &src_rect, vidSurface->pixels, vidSurface->pitch);
|
||||
SDL_UnlockSurface(vidSurface);
|
||||
}
|
||||
SDL_UnlockTexture(texture);
|
||||
|
||||
SDL_RenderClear(renderer);
|
||||
SDL_RenderCopy(renderer, texture, &src_rect, NULL);
|
||||
@@ -1493,11 +1553,14 @@ void I_SetPalette(RGBA_t *palette)
|
||||
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
localPalette[i] = 0xff000000;
|
||||
localPalette[i] |= palette[i].s.red << 0;
|
||||
localPalette[i] |= palette[i].s.green << 8;
|
||||
localPalette[i] |= palette[i].s.blue << 16;
|
||||
localPalette[i].r = palette[i].s.red;
|
||||
localPalette[i].g = palette[i].s.green;
|
||||
localPalette[i].b = palette[i].s.blue;
|
||||
}
|
||||
|
||||
//if (vidSurface) SDL_SetPaletteColors(vidSurface->format->palette, localPalette, 0, 256);
|
||||
// Fury -- SDL2 vidSurface is a 32-bit surface buffer copied to the texture. It's not palletized, like bufSurface.
|
||||
if (bufSurface) SDL_SetPaletteColors(bufSurface->format->palette, localPalette, 0, 256);
|
||||
}
|
||||
|
||||
// return number of fullscreen + X11 modes
|
||||
@@ -1619,6 +1682,15 @@ INT32 VID_SetMode(INT32 modeNum)
|
||||
SDLSetMode(vid.width, vid.height, USE_FULLSCREEN);
|
||||
Impl_VideoSetupBuffer();
|
||||
|
||||
if (rendermode == render_soft)
|
||||
{
|
||||
if (bufSurface)
|
||||
{
|
||||
SDL_FreeSurface(bufSurface);
|
||||
bufSurface = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
src_rect.w = vid.width;
|
||||
src_rect.h = vid.height;
|
||||
|
||||
@@ -1746,19 +1818,36 @@ static void Impl_SetWindowIcon(void)
|
||||
SDL_SetWindowIcon(window, icoSurface);
|
||||
}
|
||||
|
||||
static void Impl_VideoSetupSDLBuffer(void)
|
||||
{
|
||||
if (bufSurface != NULL)
|
||||
{
|
||||
SDL_FreeSurface(bufSurface);
|
||||
bufSurface = NULL;
|
||||
}
|
||||
// Set up the SDL palletized buffer (copied to vidbuffer before being rendered to texture)
|
||||
bufSurface = SDL_CreateRGBSurfaceFrom(vid.screens[0], vid.width, vid.height, 8,
|
||||
(int)vid.rowbytes, 0x00000000, 0x00000000, 0x00000000, 0x00000000); // 256 mode
|
||||
|
||||
if (bufSurface)
|
||||
{
|
||||
SDL_SetPaletteColors(bufSurface->format->palette, localPalette, 0, 256);
|
||||
}
|
||||
else
|
||||
{
|
||||
I_Error("%s", M_GetText("No system memory for SDL buffer surface\n"));
|
||||
}
|
||||
}
|
||||
|
||||
static void Impl_VideoSetupBuffer(void)
|
||||
{
|
||||
// Set up game's software render buffer
|
||||
size_t size;
|
||||
|
||||
vid.rowbytes = vid.width;
|
||||
|
||||
if (vid.buffer)
|
||||
free(vid.buffer);
|
||||
|
||||
size = vid.rowbytes*vid.height * NUMSCREENS;
|
||||
|
||||
vid.buffer = calloc(size, NUMSCREENS);
|
||||
vid.buffer = calloc(vid.rowbytes*vid.height, NUMSCREENS);
|
||||
|
||||
if (!vid.buffer)
|
||||
{
|
||||
@@ -1785,6 +1874,7 @@ void I_StartupGraphics(void)
|
||||
return;
|
||||
|
||||
COM_AddCommand ("vid_nummodes", VID_Command_NumModes_f);
|
||||
COM_AddCommand ("vid_info", VID_Command_Info_f);
|
||||
COM_AddCommand ("vid_modelist", VID_Command_ModeList_f);
|
||||
COM_AddCommand ("vid_mode", VID_Command_Mode_f);
|
||||
CV_RegisterVar (&cv_vidwait);
|
||||
@@ -1986,6 +2076,7 @@ void I_StartupGraphics(void)
|
||||
realwidth = (Uint16)vid.width;
|
||||
realheight = (Uint16)vid.height;
|
||||
|
||||
VID_Command_Info_f();
|
||||
SDLdoUngrabMouse();
|
||||
|
||||
SDL_RaiseWindow(window);
|
||||
@@ -2010,9 +2101,17 @@ void I_ShutdownGraphics(void)
|
||||
|
||||
if (oldrendermode == render_soft)
|
||||
{
|
||||
if (vidSurface)
|
||||
SDL_FreeSurface(vidSurface);
|
||||
vidSurface = NULL;
|
||||
|
||||
if (vid.buffer)
|
||||
free(vid.buffer);
|
||||
vid.buffer = NULL;
|
||||
|
||||
if (bufSurface)
|
||||
SDL_FreeSurface(bufSurface);
|
||||
bufSurface = NULL;
|
||||
}
|
||||
|
||||
I_OutputMsg("I_ShutdownGraphics(): ");
|
||||
|
||||
+8
-4
@@ -189,7 +189,7 @@ static void Snd_LockAudio(void) //Alam: Lock audio data and uninstall audio call
|
||||
{
|
||||
if (Snd_Mutex) SDL_LockMutex(Snd_Mutex);
|
||||
else if (sound_disabled) return;
|
||||
else if (music_disabled) SDL_LockAudio();
|
||||
else if (midi_disabled && digital_disabled) SDL_LockAudio();
|
||||
#ifdef HAVE_MIXER
|
||||
else if (musicStarted) Mix_SetPostMix(NULL, NULL);
|
||||
#endif
|
||||
@@ -199,7 +199,7 @@ static void Snd_UnlockAudio(void) //Alam: Unlock audio data and reinstall audio
|
||||
{
|
||||
if (Snd_Mutex) SDL_UnlockMutex(Snd_Mutex);
|
||||
else if (sound_disabled) return;
|
||||
else if (music_disabled) SDL_UnlockAudio();
|
||||
else if (midi_disabled && digital_disabled) SDL_UnlockAudio();
|
||||
#ifdef HAVE_MIXER
|
||||
else if (musicStarted) Mix_SetPostMix(audio.callback, audio.userdata);
|
||||
#endif
|
||||
@@ -1061,7 +1061,7 @@ void I_ShutdownSound(void)
|
||||
|
||||
CONS_Printf("I_ShutdownSound: ");
|
||||
|
||||
if (music_disabled)
|
||||
if (midi_disabled && digital_disabled)
|
||||
SDL_CloseAudio();
|
||||
CONS_Printf("%s", M_GetText("shut down\n"));
|
||||
sound_started = false;
|
||||
@@ -1078,7 +1078,11 @@ void I_UpdateSound(void)
|
||||
void I_StartupSound(void)
|
||||
{
|
||||
#ifndef HAVE_MIXER
|
||||
music_disabled = true;
|
||||
#ifndef NO_MIDI
|
||||
midi_disabled =
|
||||
#endif
|
||||
digital_disabled = true;
|
||||
#endif
|
||||
|
||||
memset(channels, 0, sizeof (channels)); //Alam: Clean it
|
||||
|
||||
|
||||
+2
-15
@@ -367,7 +367,7 @@ static void ST_drawDebugInfo(void)
|
||||
{
|
||||
INT32 height = 192;
|
||||
|
||||
if (!cv_debug || !stplyr->mo)
|
||||
if (!stplyr->mo)
|
||||
return;
|
||||
|
||||
if (cv_debug & DBG_BASIC)
|
||||
@@ -438,21 +438,9 @@ static void ST_drawLevelTitle(void)
|
||||
zonttl = mapheaderinfo[gamemap-1]->zonttl; // SRB2kart
|
||||
actnum = mapheaderinfo[gamemap-1]->actnum;
|
||||
dupcalc = (vid.width/vid.dupx);
|
||||
|
||||
gtc = G_GetGametypeColor(gametype);
|
||||
bary = (splitscreen) ? BASEVIDHEIGHT/2 : 163;
|
||||
|
||||
if (K_UseColorHud())
|
||||
{
|
||||
if (gametype == GT_RACE)
|
||||
gtc = colortranslations[K_GetHudColor()][7]; // idk if this should also apply to other gametypes?
|
||||
else if (modeattacking || gamestate == GS_TIMEATTACK)
|
||||
gtc = colortranslations[K_GetHudColor()][4];
|
||||
else
|
||||
gtc = G_GetGametypeColor(gametype);
|
||||
}
|
||||
else
|
||||
gtc = G_GetGametypeColor(gametype);
|
||||
|
||||
lvlw = V_LevelNameWidth(lvlttl);
|
||||
|
||||
if (actnum[0])
|
||||
@@ -803,6 +791,5 @@ void ST_Drawer(void)
|
||||
else
|
||||
V_DrawFadeScreen(120, 15-timeinmap); // Then gradually fade out from there
|
||||
}
|
||||
|
||||
ST_drawDebugInfo();
|
||||
}
|
||||
+5
-33
@@ -615,21 +615,8 @@ static void CV_constextsize_OnChange(void)
|
||||
void VID_BlitLinearScreen(const UINT8 *srcptr, UINT8 *destptr, INT32 width, INT32 height, size_t srcrowbytes,
|
||||
size_t destrowbytes)
|
||||
{
|
||||
if (srcrowbytes == destrowbytes)
|
||||
{
|
||||
size_t i = srcrowbytes * height;
|
||||
#if defined(__SSE__)
|
||||
while (i >= 16)
|
||||
{
|
||||
// TODO: find where the buffer is misaligned at times and align it
|
||||
_mm_storeu_ps((float *)destptr, _mm_loadu_ps((const float *)srcptr));
|
||||
srcptr += 16;
|
||||
destptr += 16;
|
||||
i -= 16;
|
||||
}
|
||||
#endif
|
||||
M_Memcpy(destptr, srcptr, i);
|
||||
}
|
||||
if ((srcrowbytes == destrowbytes) && (srcrowbytes == (size_t)width))
|
||||
M_Memcpy(destptr, srcptr, srcrowbytes * height);
|
||||
else
|
||||
{
|
||||
while (height--)
|
||||
@@ -3788,32 +3775,17 @@ UINT8 GetColorLUTDirect(colorlookup_t *lut, UINT8 r, UINT8 g, UINT8 b)
|
||||
void V_Init(void)
|
||||
{
|
||||
INT32 i;
|
||||
UINT8 *base = vid.buffer;
|
||||
const INT32 screensize = vid.rowbytes * vid.height;
|
||||
|
||||
for (i = 0; i < NUMSCREENS; i++)
|
||||
{
|
||||
#if defined(__SSE__)
|
||||
aligned_free(vid.screens[i]);
|
||||
#else
|
||||
free(vid.screens[i]);
|
||||
#endif
|
||||
vid.screens[i] = NULL;
|
||||
}
|
||||
|
||||
// start address of NUMSCREENS * width*height vidbuffers
|
||||
if (screensize > 0)
|
||||
if (base)
|
||||
{
|
||||
for (i = 0; i < NUMSCREENS; i++)
|
||||
{
|
||||
// we need to allocate these relative to their cpu restrictions to not trigger segfaults
|
||||
// TODO: add support for sve and neon
|
||||
#if defined(__SSE__)
|
||||
vid.screens[i] = aligned_alloc(128, screensize);
|
||||
#else
|
||||
vid.screens[i] = malloc(screensize);
|
||||
#endif
|
||||
memset(vid.screens[i], 0, screensize);
|
||||
}
|
||||
vid.screens[i] = base + i*screensize;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
@@ -23,18 +23,6 @@ extern "C" {
|
||||
#include "r_defs.h"
|
||||
#include "r_main.h"
|
||||
|
||||
#if defined(__SSE__)
|
||||
#ifdef _WIN32
|
||||
#include <malloc.h>
|
||||
#define aligned_alloc(align, size) _aligned_malloc(size, align)
|
||||
#define aligned_free(ptr) _aligned_free(ptr)
|
||||
#else
|
||||
#define aligned_free(ptr) free(ptr)
|
||||
#endif
|
||||
|
||||
#include <immintrin.h>
|
||||
#endif
|
||||
|
||||
//
|
||||
// VIDEO
|
||||
//
|
||||
|
||||
+1
-1
@@ -1819,7 +1819,7 @@ void *W_CachePatchNumPwad(UINT16 wad, UINT16 lump, INT32 tag)
|
||||
|
||||
#ifdef HWRENDER
|
||||
// Software-only compile cache the data without conversion
|
||||
if (patch != NULL && rendermode == render_opengl)
|
||||
if (rendermode == render_opengl)
|
||||
Patch_CreateGL(patch);
|
||||
#endif
|
||||
|
||||
|
||||
+61
-15
@@ -73,6 +73,7 @@ static huddrawlist_h luahuddrawlist_intermission = NULL;
|
||||
static huddrawlist_h luahuddrawlist_vote = NULL;
|
||||
|
||||
static void Y_FollowIntermission(void);
|
||||
static void Y_UnloadData(void);
|
||||
|
||||
// SRB2Kart: voting stuff
|
||||
// Level images
|
||||
@@ -111,6 +112,8 @@ static y_voteclient voteclient;
|
||||
static INT32 votetic;
|
||||
static INT32 voteendtic = -1;
|
||||
|
||||
static void Y_UnloadVoteData(void);
|
||||
|
||||
//
|
||||
// SRB2Kart - Y_CalculateMatchData and ancillary functions
|
||||
//
|
||||
@@ -786,7 +789,7 @@ void Y_StartIntermission(void)
|
||||
break;
|
||||
}
|
||||
|
||||
bgtile = W_CachePatchName("SRB2BACK", PU_PATCH_LOWPRIORITY);
|
||||
bgtile = W_CachePatchName("SRB2BACK", PU_PATCH);
|
||||
|
||||
LUA_HUD_DestroyDrawList(luahuddrawlist_intermission);
|
||||
luahuddrawlist_intermission = LUA_HUD_CreateDrawList();
|
||||
@@ -799,6 +802,9 @@ void Y_StartIntermission(void)
|
||||
//
|
||||
void Y_EndIntermission(void)
|
||||
{
|
||||
if (!dedicated)
|
||||
Y_UnloadData();
|
||||
|
||||
endtic = -1;
|
||||
sorttic = -1;
|
||||
intertype = int_none;
|
||||
@@ -815,6 +821,20 @@ static void Y_FollowIntermission(void)
|
||||
G_AfterIntermission();
|
||||
}
|
||||
|
||||
#define UNLOAD(x) {if ((x) != NULL) {Patch_Free(x);} x = NULL;}
|
||||
|
||||
//
|
||||
// Y_UnloadData
|
||||
//
|
||||
static void Y_UnloadData(void)
|
||||
{
|
||||
// unload the background patches
|
||||
UNLOAD(VoteScreen.bgpatch);
|
||||
UNLOAD(VoteScreen.widebgpatch);
|
||||
UNLOAD(bgtile);
|
||||
//UNLOAD(interpic);
|
||||
}
|
||||
|
||||
// SRB2Kart: Voting!
|
||||
|
||||
//
|
||||
@@ -857,8 +877,8 @@ static void Y_VoteScreenCheck(void)
|
||||
|
||||
// non lua vote background handling
|
||||
boolean prefbattletype = ((votelevels[0][1] & ~0x80) == GT_MATCH);
|
||||
VoteScreen.widebgpatch = W_CachePatchName((prefbattletype ? "BATTLSCW" : "INTERSCW"), PU_PATCH_LOWPRIORITY);
|
||||
VoteScreen.bgpatch = W_CachePatchName((prefbattletype ? "BATTLSCR" : "INTERSCR"), PU_PATCH_LOWPRIORITY);
|
||||
VoteScreen.widebgpatch = W_CachePatchName((prefbattletype ? "BATTLSCW" : "INTERSCW"), PU_PATCH);
|
||||
VoteScreen.bgpatch = W_CachePatchName((prefbattletype ? "BATTLSCR" : "INTERSCR"), PU_PATCH);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -906,7 +926,7 @@ static void Y_DrawLuaVoteScreenPatch(boolean widePatch)
|
||||
// Draw non animated patch
|
||||
if (!tempfoundAnimLuaVoteFrames)
|
||||
{
|
||||
votebg = W_CachePatchName(va("%s1", tempPrefix), PU_PATCH_LOWPRIORITY);
|
||||
votebg = W_CachePatchName(va("%s1", tempPrefix), PU_PATCH);
|
||||
Y_VoteBackgroundDrawer(votebg);
|
||||
return;
|
||||
}
|
||||
@@ -919,7 +939,7 @@ static void Y_DrawLuaVoteScreenPatch(boolean widePatch)
|
||||
|
||||
nextframe = (VoteScreen.currentAnimFrame + 1);
|
||||
|
||||
votebg = W_CachePatchName(va("%s%d", tempPrefix, nextframe), PU_PATCH_LOWPRIORITY);
|
||||
votebg = W_CachePatchName(va("%s%d", tempPrefix, nextframe), PU_PATCH);
|
||||
|
||||
Y_VoteBackgroundDrawer(votebg);
|
||||
|
||||
@@ -1461,14 +1481,14 @@ static void Y_InitVoteDrawing(void)
|
||||
// setup the background patches
|
||||
Y_VoteScreenCheck();
|
||||
|
||||
VoteScreen.cursor[0] = W_CachePatchName("M_CURSOR", PU_PATCH_LOWPRIORITY);
|
||||
VoteScreen.cursor[1] = W_CachePatchName("P1CURSOR", PU_PATCH_LOWPRIORITY);
|
||||
VoteScreen.cursor[2] = W_CachePatchName("P2CURSOR", PU_PATCH_LOWPRIORITY);
|
||||
VoteScreen.cursor[3] = W_CachePatchName("P3CURSOR", PU_PATCH_LOWPRIORITY);
|
||||
VoteScreen.cursor[4] = W_CachePatchName("P4CURSOR", PU_PATCH_LOWPRIORITY);
|
||||
VoteScreen.cursor[0] = W_CachePatchName("M_CURSOR", PU_PATCH);
|
||||
VoteScreen.cursor[1] = W_CachePatchName("P1CURSOR", PU_PATCH);
|
||||
VoteScreen.cursor[2] = W_CachePatchName("P2CURSOR", PU_PATCH);
|
||||
VoteScreen.cursor[3] = W_CachePatchName("P3CURSOR", PU_PATCH);
|
||||
VoteScreen.cursor[4] = W_CachePatchName("P4CURSOR", PU_PATCH);
|
||||
|
||||
VoteScreen.randomlvl = W_CachePatchName("RANDOMLV", PU_PATCH_LOWPRIORITY);
|
||||
VoteScreen.rubyicon = W_CachePatchName("RUBYICON", PU_PATCH_LOWPRIORITY);
|
||||
VoteScreen.randomlvl = W_CachePatchName("RANDOMLV", PU_PATCH);
|
||||
VoteScreen.rubyicon = W_CachePatchName("RUBYICON", PU_PATCH);
|
||||
}
|
||||
|
||||
void Y_StartVote(void)
|
||||
@@ -1553,9 +1573,9 @@ void Y_StartVote(void)
|
||||
{
|
||||
lumpnum = W_CheckNumForName(va("%sP", G_BuildMapName(votelevels[i][0]+1)));
|
||||
if (lumpnum != LUMPERROR)
|
||||
levelinfo[i].pic = W_CachePatchName(va("%sP", G_BuildMapName(votelevels[i][0]+1)), PU_PATCH_LOWPRIORITY);
|
||||
levelinfo[i].pic = W_CachePatchName(va("%sP", G_BuildMapName(votelevels[i][0]+1)), PU_PATCH);
|
||||
else
|
||||
levelinfo[i].pic = W_CachePatchName("BLANKLVL", PU_PATCH_LOWPRIORITY);
|
||||
levelinfo[i].pic = W_CachePatchName("BLANKLVL", PU_PATCH);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1570,10 +1590,36 @@ void Y_StartVote(void)
|
||||
//
|
||||
void Y_EndVote(void)
|
||||
{
|
||||
voteclient.loaded = false;
|
||||
Y_UnloadVoteData();
|
||||
voteendtic = -1;
|
||||
}
|
||||
|
||||
//
|
||||
// Y_UnloadVoteData
|
||||
//
|
||||
static void Y_UnloadVoteData(void)
|
||||
{
|
||||
voteclient.loaded = false;
|
||||
|
||||
if (dedicated)
|
||||
return;
|
||||
|
||||
UNLOAD(VoteScreen.widebgpatch);
|
||||
UNLOAD(VoteScreen.bgpatch);
|
||||
UNLOAD(VoteScreen.cursor[0]);
|
||||
UNLOAD(VoteScreen.cursor[1]);
|
||||
UNLOAD(VoteScreen.cursor[2]);
|
||||
UNLOAD(VoteScreen.cursor[3]);
|
||||
UNLOAD(VoteScreen.cursor[4]);
|
||||
UNLOAD(VoteScreen.randomlvl);
|
||||
UNLOAD(VoteScreen.rubyicon);
|
||||
|
||||
UNLOAD(levelinfo[3].pic);
|
||||
UNLOAD(levelinfo[2].pic);
|
||||
UNLOAD(levelinfo[1].pic);
|
||||
UNLOAD(levelinfo[0].pic);
|
||||
}
|
||||
|
||||
//
|
||||
// Y_SetupVoteFinish
|
||||
//
|
||||
|
||||
+17
-17
@@ -503,7 +503,7 @@ void Z_CheckHeap(INT32 tag)
|
||||
{
|
||||
I_Error("Z_CheckHeap %d: block %u"
|
||||
#ifdef ZDEBUG
|
||||
" (owned by %s:%d)"
|
||||
"(owned by %s:%d)"
|
||||
#endif
|
||||
" should not exist", i, blocknumon
|
||||
#ifdef ZDEBUG
|
||||
@@ -514,13 +514,13 @@ void Z_CheckHeap(INT32 tag)
|
||||
#endif
|
||||
if (block->user != NULL && *(block->user) != given)
|
||||
{
|
||||
I_Error("Z_CheckHeap :"
|
||||
I_Error("Z_CheckHeap"
|
||||
#ifdef ZDEBUG
|
||||
" %s %d"
|
||||
"at %s %d :"
|
||||
#endif
|
||||
" block %u"
|
||||
"block %u"
|
||||
#ifdef ZDEBUG
|
||||
" (owned by %s:%d)"
|
||||
"(owned by %s:%d)"
|
||||
#endif
|
||||
" doesn't have a proper user"
|
||||
#ifdef ZDEBUG
|
||||
@@ -534,13 +534,13 @@ void Z_CheckHeap(INT32 tag)
|
||||
}
|
||||
if (block->next->prev != block)
|
||||
{
|
||||
I_Error("Z_CheckHeap :"
|
||||
I_Error("Z_CheckHeap"
|
||||
#ifdef ZDEBUG
|
||||
" %s %d"
|
||||
"at %s %d :"
|
||||
#endif
|
||||
" block %u"
|
||||
"block %u"
|
||||
#ifdef ZDEBUG
|
||||
" (owned by %s:%d)"
|
||||
"(owned by %s:%d)"
|
||||
#endif
|
||||
" lacks proper backlink"
|
||||
#ifdef ZDEBUG
|
||||
@@ -554,13 +554,13 @@ void Z_CheckHeap(INT32 tag)
|
||||
}
|
||||
if (block->prev->next != block)
|
||||
{
|
||||
I_Error("Z_CheckHeap :"
|
||||
I_Error("Z_CheckHeap"
|
||||
#ifdef ZDEBUG
|
||||
" %s %d"
|
||||
"at %s %d :"
|
||||
#endif
|
||||
" block %u"
|
||||
"block %u"
|
||||
#ifdef ZDEBUG
|
||||
" (owned by %s:%d)"
|
||||
"(owned by %s:%d)"
|
||||
#endif
|
||||
" lacks proper forward link"
|
||||
#ifdef ZDEBUG
|
||||
@@ -574,13 +574,13 @@ void Z_CheckHeap(INT32 tag)
|
||||
}
|
||||
if (block->id != ZONEID)
|
||||
{
|
||||
I_Error("Z_CheckHeap :"
|
||||
I_Error("Z_CheckHeap"
|
||||
#ifdef ZDEBUG
|
||||
" %s %d"
|
||||
"at %s %d :"
|
||||
#endif
|
||||
" block %u"
|
||||
"block %u"
|
||||
#ifdef ZDEBUG
|
||||
" (owned by %s:%d)"
|
||||
"(owned by %s:%d)"
|
||||
#endif
|
||||
" have the wrong ID"
|
||||
#ifdef ZDEBUG
|
||||
|
||||
Reference in new issue
Block a user